optional hessian parameter commented out in code
added some generics