refactor decision tree class