bugs in BinarySearch removed