quick newton-raphson method