added ability to use a specific sliding window size