init cpp version