Create an improved binarySearch