be sure to not add a node twice to the bipartite matching