Update MainFunctions.cpp