added sys.exit