Refactoring
Correct processing of intervals in both systems