Added average ratings calculation