finish sorted range searching algorithms