go: be smart about calculating the average