Implemented analytic Hessian