update CheckSubTree and FirstCommonParent