store structure attributes in their own class rather than in a hash