RstatsPerlAPI change from method to  functions