convert to cpp