added bisection root find