routers refactor