Fix a bug in run_analysis & add codebook