update Prototype3.cpp code