work on R pkg