updated to remove warnings from R CMD CHECK