now exits cleanly on win or lose