1st working version for CRAN