Modified example to pass R CMD check