public void addValueToHashes(String currState,String prevState,double totalValue,
			HashMap<String,String> bestToFrom,HashMap<String,Double> bestScoreTo) {
	  Double myVal=bestScoreTo.get(currState);
	  if (myVal==null || myVal<totalValue) {
		myVal=new Double(totalValue);
		bestToFrom.put(currState,prevState);
		bestScoreTo.put(currState,myVal);
	  }
	}