add reduce function with can take arbitrary averages given window size = X minutes