routes refactor