add another mothode for binary search