could you do this with attributes as well?

Thanks for your response.