changed isEquilvalenetTreeNode() to const