implementing IntervalSet class, part 2