Modify main.cpp to have same code before...

accidental deletion