added controllers, modified routes using controllers