assignment 2 for Rails class