updated version of app.rb