quick and sloppy classification_tree implementation.  Must be revised asap.