moving average with arrays!