replace movingAvg by movingAverage
call which to speed up subsetting