add an cpp version