added bisection and newton