public ArrayList<node> traverseGraph(node start_node){
		ArrayList<node> visited = new ArrayList<node>();
		node current =null;
		node starting;
		starting = start_node;
		boolean finished = false;
		while(finished ==false){
			node temp = null;
			int smallestDistance= 10000;
			//set the current node to starting for the first pass;
			if(current == null){
				current = starting;
			}
			
			//this is to ensure we do not add a node twice, if this condition is not met it will end the loop and return the list
			if(isVisited(current, visited)==false){
				visited.add(current);
			}else
				break;
			/*
			 * we need to find the vertex with the smallest distance AND make 
			 * sure that the adjacent node is not in the visited list.
			 */
			for(int j = 0; j<current.getVertices().size(); j++){				
				
				if(smallestDistance >= current.getVertices().get(j).getDistance() 
				&& isVisited(current.getVertices().get(j).adjacentNode, visited)==false){
					smallestDistance = current.getVertices().get(j).getDistance();
					temp = current.getVertices().get(j).adjacentNode;
				}
				//if there are no more nodes to visit we need to backtrack 
				//set j = 0 and change the current node to the previous one
				else if(deadEnd(current, visited)){
					j=0;
					current = getPrevious(current, visited);
					if(current.getName() == starting.getName() && allVisited(visited, current)){
						finished = true;
						break;
					}
				}
			}
				current = temp;
		}//searching forloop
	return visited;
	}