backprop changes for less memory usage