now passes R CMD check