use interval tree to get intervals within a span
sort intervals