updated R interface