time window sliding now working properly