refactor routes part 1