cleaned up for cran based on submission response