Use "exit" instead of "return" for the main logic