moving average sample update