refactoring + routes