second version of the R code, readme and codebook