modify tree printing functions