Added the router and the routing logic