refactor routes design