Update main.cpp

OK so I'd like this to be merged to the main line code please.