Update binarySearch_an enhanced version