added update code for new types of trees.