Adding in newton raphson