Updated main.cpp, previous one was an old version