router refactoring [ci skip]