Alternative implementation of interval tree search subroutine