add readme file, codebook file and fixed a bug in the script