following rails tutorial at http://ruby.railstutorial.org/