following http://www.railstutorial.org/book