added tree generation