private void bfs(State s)
	{
		
		s.id = -1;
		Loc f = map.finish; //the finish
		
		int counter = 0;
				
		LinkedList<Node> frontier = new LinkedList<Node>(); //states to look at
		Set<State> explored = new HashSet<State>();   //explored locations
		
		LinkedList<State> solution = new LinkedList<State>(); //the solutions
		
		frontier.addLast(new Node(s, null, 0)); //add the first robot state
		
		//run the search
		while (!frontier.isEmpty())
		{
			Node current = frontier.removeFirst(); //chooses the first node in frontier
									
			// build plan if goal
			if (goalTest(current.state, f))
			{
				for (Node node = current; node != null; node = node.parent)
				{
					solution.addFirst(node.state);  //add path nodes to solution
				}
				System.out.println("found goal!");
				System.out.println("moves: " + solution.size());
				mSolutions.addAll(solution);
				return;
			}
			
			explored.add(current.state);
			
			if (counter % 5000 == 0){System.out.print("\n");};
			if (counter % 50 == 0) {System.out.print(".");}; 
						
			ArrayList<State> possibles =  getMovesCorrectlyPlease(current.state);

			for (int i=0; i < possibles.size(); i++) // for all the children
			{
				State possib = possibles.get(i); 
				
				// if we haven't explored it yet
				// add it to frontier with a distance
				if (! explored.contains(possib))
				{
					frontier.addLast(new Node(possib, current, current.distance + 1));
				}
			}
			counter++;
		}
		if (solution.isEmpty())
		{
			System.out.println("FAILED TO FIND SOLUTION");
		}
	}