working on a printing listner for the tree