test function for Rcpp added