use ```Set<Node>``` here