connect model to controller