calculated averages, now time to refactor