Small changes to the cpp file