final cpp conversion