moved some arguments around, about to R CMD check
passes R CMD check