Changes to add_training_set and add_test_set