Fixed new2.cpp code