Update mes.cpp