fixed calculation of average

so far only returned the total score