reworking tree for better tracking