changed the structure and improved the routing