Update codebook as md