Faster if query is sorted and works with BED.