improve BinarySearch()