target.
correct implementation of binary search.