allow for setting averaging over x iterations