binary search - variations