adding moving average prototype