Exercise 4.2 from Shapiro/decision trees completed