backpropagation refactoring