calculate arbitrary rolling windows, eg moving average, closes #13