Chapter 3 tree exercises (half)