correctly calculates the end of the restricted windows based on a new column  that has the window duration.