added agrad/fwd/value_of with tests