writing codebook