flipped order of training set and test set in data collection section