Playing with some tree code from online