Issue187 moving average

This address #187