code for classifiers (not 100% yet).