added new c++ code