Selecting intervals instead of a box