tidied up codebook