Codebook formatting