make training data script classy