refactored routes with resources