added codebook and fixed t&f based columns