some changes to the model to help many-to-many relationship lookups