use common function to generate kmer using random way