update the training data