public File tidy( File f ) throws IOException {
        FileWriter out = new FileWriter("cleaned.gram");
        HashMap<Integer, String[]> packaged = sort(f);
        for ( Integer i : packaged.keySet() ){
            String[] entry = packaged.get(i);
            out.write( entry[0] );
            out.write("\n");

            String seq = entry[1];
            int offset = 0;
            String sub = "";
            int seqLen = seq.length();
            while (true) {
                if ( offset + BLOCKSIZE > seqLen ){
                    String last = seq.substring(offset, seqLen);
                    out.write(last);
                    break;
                } else {
                    sub = seq.substring( offset, offset+BLOCKSIZE );
                    out.write( sub );
                    out.write("\n");
                    offset += BLOCKSIZE;
                }
            }
        }
        out.close();
        return new File("cleaned.gram");
    }