public static List<String> breadthFirstSearch(Graph graph, String start, String goal)
	{		
		HashMap<String,Vertex> vertices = graph.getVertices(); // get all the vertices
		if(!vertices.containsKey(start) || !vertices.containsKey(goal)){
			//			System.out.println("Goal: " + goal + "  " + vertices.containsKey(goal));
			throw new UnsupportedOperationException("The graph does not contain either the starting vertex or the goal vertex");

		}
		LinkedList<Vertex> queue = new LinkedList<Vertex>();//The queue
		vertices.get(start).setVisited(true);//Set the beginning to visited
		queue.addFirst(vertices.get(start));//Enqueue the start


		//Main process:
		while(!queue.isEmpty()) { //While the queue is not empty, loop:
			Vertex temp = queue.pop();//Dequeue to a temp
			if(temp.equals(vertices.get(goal)))//If the temp is the goal we are done.
				break;
			LinkedList<Edge> edges = temp.getEdges();//List of all the adjacent edges
			for(Edge e: edges)
				if(!e.getOtherVertex().getVisited()){
					e.getOtherVertex().setVisited(true);
					e.getOtherVertex().setCameFrom(temp);
					queue.addLast(e.getOtherVertex());//enqueue the adjacent vertex
				}
		}

		//Set up the result
		List<String> list = new LinkedList<String>();//the list we are returning

		if(vertices.get(goal).getCameFrom() == null)
			return list;

		list.add(vertices.get(goal).getName());//add the goal to cameFrom
		Vertex temp = vertices.get(goal);//set a temp Vertex as the goal
		while(!temp.equals(vertices.get(start))){//While the temp !equal the start
			list.add(0, temp.getCameFrom().getName());//add them in reverse order to get the travel path
			temp = temp.getCameFrom();//switch the temp pointer
		}
		return list;
	}