using interval trees