edited the models and controllers to establish relationships