Added calculations for ratings