Added more code to backprop