refactoring to routeProvider