2nd submission - check as cran passed