updated rating.rb