Example Code for Tree Lecture