linked controller to model to db