added routes and updated the controllers