Modify the file main.cpp for M487