added new R functions to package