changed codebook format