public K getMax(){
        K maxKey = null;
        Integer maxValue = Integer.MIN_VALUE;
        for (Map.Entry<K, Integer> entry : map.entrySet()){
            if (entry.getValue() > maxValue){
                maxKey = entry.getKey();
                maxValue = entry.getValue();
            }
        }
        return maxKey;
    }