autoDeriv possibly works