added backprop to circuit