fixed changes suggested by CRAN