refactor applicaiton.rb