added running_avg() macro