sliding window and testing class