first time debugging new sliding window function