router refactoring
bug fixed