add BackPropagation method to train the neural network