added grad_output.cc