General procedure for the synthesis of methyl 7-bromo-1H-indazole-5-carboxylate from methyl 4-amino-3-bromo-5-methylbenzoate: to a mixture of methyl 4-amino-3-bromo-5-methylbenzoate (2.2 g, 9.1 mmol) in acetic acid (40 ml) was added slowly and dropwise a solution of sodium nitrite (6.27 g, 9.1 mmol) in water (9 ml). The reaction mixture was stirred at room temperature for 5 hours. Subsequently, the solvent was removed by distillation under reduced pressure. The resulting solid was ground with ethyl acetate (40 ml) and filtered. The filtrate was concentrated to give methyl 7-bromo-1H-indazole-5-carboxylate (575 mg, 25% yield).