Added code to reflect changes in the cpp