added print and print tree functions - compiles fine