How the Iran deal happened