added basic Rcpp functionality