new bisection search code