added connection to the new R API