Change wrapper into R