up to problem 43
finished trees chapter