finished route refactoring