modified build_training_Data