access tree data correctly in print