added "rating" class method to user model