update moving window