first implementation of the tree printer
fix