fixed merged routes.rb file and added control flow from beginning to end