second try codebook update