Corrected missing end in main