# Synthesis of diclofenac

I found a synthesis of diclofenac, and the last step with the addition of hydrazine and $\ce{KOH}$ seems interesting.

However, I couldn't find the mechanism behind this reaction, therefore I proposed one forming $\ce{N2}$.

Could you help me find the right mechanism regarding this type of reaction or correct mine?