Another nit: just as the then branch is extracted to `finishExchange()` you can extract the else branch to `startStep(step + 1)`.