Modify BinarySearch