added test for sliding window