Added backpropagation, no loops