Added dynamic tree update