following http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-the_first_application