add some tree utils & tests