Creating DetectMEI.cpp based on example.cpp