add new cpp file
modify code