Update an improved binarySearch