Updated with Hessian matrix