trying to fix a tree output problem