use sys.exit to quit program