added stuff to connect model to controller