fixed refactoring for TimeIntervals