finishes recursive binary search