# How does this brominated intermediate lose its methyl group?

The problem is such:

So far my working has been:

I'm concerned about the last step where the ester forms a ring. The methyl group doesn't look like a plausible leaving group, but it does not appear in the product so how can I get rid of it?

• @A.K. Sorry! I was having difficulty uploading the image.. Please have a look now! – justbehappy Dec 29 '15 at 23:12
• I think your top drawing is incomplete. Specifically, hydrolysis of the ester is required in order to first convert it to the carboxylate anion. It is the oxygen in this anion that reacts with the bromonium ion to form the intramolecular lactone. To achieve this the bromination takes place in the presence of sodium bicarbonate which hydrolyzes the ester. You can google "bromolactonization" or see this link for the analogous iodolactonization. – ron Dec 29 '15 at 23:19
• @ron yes thanks for pointing it out. My working contains the next few steps of the reaction mechanism, but i had the most difficulty with the first steps as pictured – justbehappy Dec 29 '15 at 23:20

A methyl cation definitely won’t leave by itself. However, you can consider bromide ions floating around in solution. These bromide, being nucleophilic can attack the methyl group in an $\mathrm{S_N2}$ manner, because any positively charged oxygen is a good leaving group. Therefore, the side product would be bromomethane.