refactored routes