finish the inner search