add rcppRev code