public void sort(Preference[] sortSet) {
		HashSet<Preference> sorted = new HashSet<Preference>();
		Preference curr;
		do
		{
			curr = null;
			for (Preference key : sortSet)
			{
				if (!sorted.contains(key))
				{
					curr = key;
					break;
				}
			}
			if (curr == null) break; //save some time here
			
			double minVal = Double.MAX_VALUE;
			Preference minKey = null;
			for (Preference key : sortSet)
			{
				if (!sorted.contains(key) && preferences.get(key) < minVal)
				{
					minVal = preferences.get(key);
					minKey = key;
				}
			}
			preferences.put(minKey, preferences.get(curr));
			preferences.put(curr, minVal);
			sorted.add(curr);
			if (minKey == null)
			{
				System.err.println("Woah! Null minVal in Preferences.sort()");
			}
		}while(curr != null);
	}