implementation of the Interval Tree