Adding the train data splitting code