add sliding window statics calculation