changed rate_calc to average_score