add sliding window statistics