add modifications from Daniel to app.rb