The final step is a Mumm rearrangement with transfer of the R4 acyl group from oxygen to nitrogen. Note that in the related Passerini reaction (lacking the amine) the isocyanide reacts directly with the carbonyl group but other aspects of the reaction are the same. All reaction steps are reversible except for the Mumm rearrangement, which drives the whole reaction sequence.