now sliding window option is included
corrected slider in sliding window method