changed sys.exit to return