A few simple functions for averages