modified kmer_dict method