Changed codebook to md format