private int[] searchForRest(ArrayList<Production> list, Production p, int[] visited) 
	{
		HashSet <Production> visitedProd=new HashSet <Production>();
	//	System.out.println("Searching through "+list);
		int[] original=visited;
		int count=0;
		for (int i=0; i<myTrace.size(); i++)
		{
			if (list.contains(myTrace.get(i)) && visited[i]==0 && !visitedProd.contains(myTrace.get(i)))
			{
		//		System.out.println("FOUDN = "+myTrace.get(i));
				visited[i]=1;
				visitedProd.add(myTrace.get(i));
				count++;
				
			}
		}
		if (count==list.size())
		{
			myAnswer.add(p);
			return visited;
		}
		else
			return original;

	}