refactored some routes