cpp-ization of the code started