update moving average filtering