Added args to sliding window function