changes to app.rb and models