trying with hand-coded bisection...