added code for main menu