move view code out of the app.rb - take 2