refactoring routes page