initalized the controller model and database