add Dual class for automatic differentiation