add tree.isSameRoot / tree.isRoot