version that passes CRAN checks