renamed rating's rating to value and fixed get_average_rating function