rest refactoring
routes refactoring