Modify the way to generate train data