ecpp1.cpp modified