Added the sliding window stuff