added exiting to the sigint handler