added functionality to time windows