more flexible hessian output