sliding window plot working again