added setRoutes method in the router.