create controller and connect database, recreate views