Added a function to build a decision tree