modified test1.cpp