This is the first version of main.m