A new reaction swaps an oxygen for a nitrogen in structurally complex molecules