public void dfsIter(String label, Function<Vertex, Vertex> action) {


		boolean foundUnVisted = false;
		Vertex v = getVertex(label);
		while(v != null) {
			foundUnVisted = false;
			if(!v.wasVisited()) {
				action.apply(v);
				v.setVisited(true);
				stackVertices.push(v);
			}

			JList<Vertex> listOfAdjacent = getEdges(mapOfVerticeIndex.get(v.getLabel()));
			for (Vertex t : listOfAdjacent) {

				if (!t.wasVisited()) {
					foundUnVisted = true;
					v = t;
					break;
				}


			}
			if (!foundUnVisted) {
				v = stackVertices.pop();

			}
		}
	}