completed first_rate.rb assignment