add BEGIN/END_RCPP to cpp functions