adapt code to KK's suggestions and new ADOL-C version