cleaned up for based on CRAN checks