added modified cpp file. same intent previously.