Wrote printTree