routes refactoring