update tree.java