refactor routes.rb