refactor routebuilder