- implementation of simple moving average filter