Update MainEngine.cpp