add binary search code