SimpleMovingAverage implememtation