setting up the model classes and their relationships