refactoring routes