you should pass the intervals as parameters to `calculateDowntime()`to make the function testable