set routing refactor