decision tree implementation for class