update the method to read the training and testing set