based on the Learn Ruby on Rails book and tutorial by Daniel Kehoe