added backpropagation.