Added code in main.m