router + refactoring