Bisection algorithm implemented