made autoclass, also put in a plotting function