made quitting from any point in the code possible