now passes cran check