added System/exit in the main