first version passing R CMD check