Have newton-raphson working