add basic tree functionality