finished binary search