private Integer spillAndRemoveLowestCost(HashMap<Integer, Set<Integer>> copyGraph,
			HashMap<Integer, Integer> costMap) {
		int min = Integer.MAX_VALUE;
		int theone = -1;
		for (Entry<Integer, Set<Integer>> entry : copyGraph.entrySet()) {
			int cost = 0;
			if (costMap.containsKey(entry.getKey())) {
				cost = costMap.get(entry.getKey());
			}
			if (cost < min) {
				min = cost;
				theone = entry.getKey();
				if (cost == 0) {
					break;
				}
			}
		}
		if (copyGraph.remove(theone) == null) {
			throw new IllegalStateException("not possible");
		}
		return theone;
	}