added function to print the tree out nicely