fixup! [WIP] reimplment tree() function

+ removed tree() function