moved the plotting out of the feature generation