add new class (D2Fad) to compute hessians; change some methods