update the main.m file