making serialization to rcpp lists