add dynamic tree generator