Change default behavior of average method.