moved variables into codebook