added helper class for moving average