Corrected main.cpp