keep same values with codebook when clustering.