do not use size_t; use Rcpp vectors