moved view stuff to view.rb