added the logic for training and test data creation