public PHYNetwork fixNetwork() {
		// reconstruct the network from clusters of robust groups only
		Set<SNVGroup> filteredGroups = new HashSet<SNVGroup>();
		Cluster toRemove = null;
		SNVGroup group = null;
		for(PHYNode n : nodesById.values()) {
			Cluster c = n.getCluster();
			SNVGroup g = n.snvGroup;
			if(g != null) {
				if(!filteredGroups.contains(n.snvGroup)) {
					filteredGroups.add(n.snvGroup);
				}
				// check if this cluster is robust
				if((!c.isRobust())) {
					if (toRemove == null) {
						toRemove = c;
						group = g;
					} else if(c.getMembership().size() < toRemove.getMembership().size()) { // smallest
						toRemove = c;
						group = g;
					}
				}
			}
		}
		if(toRemove != null) {
			group.removeCluster(toRemove);
			logger.log(Level.INFO, "Removed cluster " + toRemove.getId() + " of group " + group.getTag() + " of size " + toRemove.getMembership().size() + " with members: ");
			for(Integer snv : toRemove.getMembership()) {
				SNVEntry entry = group.getSNVs().get(snv);
				logger.log(Level.INFO, entry.toString());
			}
		}
		return new PHYNetwork(new ArrayList<SNVGroup>(filteredGroups), numSamples);
	}