refactor routers