private void remove(){
        List<Map.Entry<String, Integer>> folder = new ArrayList<Map.Entry<String, Integer>>(frqMap2.entrySet());
        Collections.sort(folder, new Comparator<Map.Entry<String, Integer>>() {
            public int compare(Map.Entry<String, Integer> e1,
                               Map.Entry<String, Integer> e2) {
                if (!e1.getValue().equals(e2.getValue())) {
                    if (e2.getValue() > e1.getValue()) return 1;
                    else return -1;
                } else
                    return (e1.getKey()).toString().compareTo(e2.getKey().toString());
            }
        });

        for(int i = 0; i < bound; i++){
            //System.out.printf(folder.get(i).getKey() + " %.04f" + "\n", folder.get(i).getValue());
            String s = folder.get(i).getKey();
            int fre = folder.get(i).getValue();
            tokens2 -= fre;
            terms2 -= 1;
            if(valu.containsKey(s)){
                valu.remove(s);
                totalVal -= 1;
            }
            frqMap2.remove(s);
        }

        folder = new ArrayList<Map.Entry<String, Integer>>(frqMap1.entrySet());
        Collections.sort(folder, new Comparator<Map.Entry<String, Integer>>() {
            public int compare(Map.Entry<String, Integer> e1,
                               Map.Entry<String, Integer> e2) {
                if (!e1.getValue().equals(e2.getValue())) {
                    if (e2.getValue() > e1.getValue()) return 1;
                    else return -1;
                } else
                    return (e1.getKey()).toString().compareTo(e2.getKey().toString());
            }
        });

        for(int i = 0; i < bound; i++){
            //System.out.printf(folder.get(i).getKey() + " %.04f" + "\n", folder.get(i).getValue());
            String s = folder.get(i).getKey();
            int fre = folder.get(i).getValue();
            tokens1 -= fre;
            terms1 -= 1;
            if(valu.containsKey(s)){
                valu.remove(s);
                totalVal -= 1;
            }
            frqMap1.remove(s);
        }


    }