changed models and controllers to set up relationships