modified one part of the hessian calculation