public static List<String> breadthFirstSearch(Graph graph, String startName, String goalName)
	{		
		if(!graph.getVertices().containsKey(startName) || !graph.getVertices().containsKey(goalName))
			throw new UnsupportedOperationException();
		
		//CLEAR GRAPH
		for(Vertex v : graph.getVertices().values()){
			v.setCameFrom(null); 
			v.setVisited(false);
		}
		
		
		
		//PERFORM BFT BY ELIMINATION
		List<String> result = new LinkedList<String>();
		LinkedList<Vertex> queue = new LinkedList<Vertex>();

		queue.addLast(graph.getVertices().get(startName));
		graph.getVertices().get(startName).setVisited(true);

		//Create an end node for the case that an end is found.
		Vertex end = null;
		
		//Then loop through the queue.
		while(!queue.isEmpty()){
			Vertex n = queue.removeFirst();

			if(n.getName().equals(goalName)){
				end = n;
				break;
			}
			
			for(Edge e : n.getEdges()){
				Vertex neighbor = e.getOtherVertex();
				if(!neighbor.getVisited()){
					neighbor.setCameFrom(n);
					neighbor.setVisited(true);
					queue.addLast(neighbor);
				}
			}
		}

		//If we have found the end, add the path back in backwards order.
		while(end != null){
			((LinkedList<String>)result).addFirst(end.getName());
			end = end.getCameFrom();
		}


		return result;
	}