code updates for symmetric tree.