public K getMin(){
        K minKey = null;
        Double minValue = Double.valueOf(Double.MAX_VALUE);
        for (Map.Entry<K, Double> entry : map.entrySet()){
            //if this value is less than the minValue found so far
            if (entry.getValue().compareTo(minValue)<0){
                minValue = entry.getValue();
                minKey = entry.getKey();
            }
        }
        return minKey;
    }