setting up routes and controller