Reaction SMILES: [OH-].[K+].[CH3:3][O:4][C:5]1[CH:10]=[C:9]([CH3:11])[C:8]([S:12]([N:15]2[CH2:20][CH2:19][N:18]3[CH:21]=[CH:22][CH:23]=[C:17]3[CH:16]2[CH2:24][O:25][CH2:26][C:27]([O:29]CC)=[O:28])(=[O:14])=[O:13])=[C:7]([CH3:32])[CH:6]=1.O>CO.C(O)C>[CH3:3][O:4][C:5]1[CH:10]=[C:9]([CH3:11])[C:8]([S:12]([N:15]2[CH2:20][CH2:19][N:18]3[CH:21]=[CH:22][CH:23]=[C:17]3[CH:16]2[CH2:24][O:25][CH2:26][C:27]([OH:29])=[O:28])(=[O:14])=[O:13])=[C:7]([CH3:32])[CH:6]=1
Reactant: CCOC(=O)COCC1c2cccn2CCN1S(=O)(=O)c1c(C)cc(OC)cc1C
Agent: [K+]
Agent: [OH-]
Solvent: CO
Solvent: O
Solvent: CCO
Product: COc1cc(C)c(S(=O)(=O)N2CCn3cccc3C2COCC(=O)O)c(C)c1
Reaction time: 3 h

Procedure:
Method A: TEA (2 eq.) was added dropwise to a solution of 2-(1H-pyrrol-1-yl)ethanamine (16 g, 145 mmol) in DCM (400 ml) and ethyloxalyl chloride (1.11 eq.) was added at 0° C. The mixture was stirred for 5 h at RT, concentrated to small volume under vacuum and used in the following stage with no further purification. Method B: To a solution of amine (9.0 g, 68.18 mmol, 1.0 eq.) in DCM (250 ml) was added HOAt (9.2 g, 68.18 mmol, 1.0 eq.), EDCl (19.5 g, 102.27 mmol, 1.5 eq.) and DIPEA (29 ml, 170 mmol, 2.5 eq.) followed by stirred for 30 min at RT. Monoethyl malonate (11.2 g, 102.27 mmol, 1.5 eq.) in DCM (50 ml) was added to the reaction mixture. The reaction mixture was stirred at RT for 12 h. The reaction mixture was diluted with DCM (250 ml) and quenched with saturated NH4Cl solution (150 ml) and organic layer is separated. Organic layer is washed with saturated NaHCO3 solution (100 ml), brine (100 ml) and was dried in vacuo to afford solid residue which is purified by column chromatography (silica gel, 40% ethyl acetate/hexanes) to obtain the amide as light yellow oil. Yield: 51% (7.7 g, 34.4 mmol) 2. Method A:Ethyl 2-(2-(1H-pyrrol-1-yl)ethylamino)-2-oxoacetate was heated with polyphosphoric acid (7 eq.) for 4 h at 90° C. and then cooled to RT. Saturated NaHCO3 solution was added to the mixture and it was extracted with DCM. The organic phase was dried (Na2SO4), concentrated to small volume and purified by column chromatography (silica gel). Yield: 16% Method B: Ethyl 2-(2-(1H-pyrrol-1-yl)ethylamino)-2-oxoacetate (7 g, 33.3 mmol, 1.0 eq.) was taken up in a round bottom flask and cooled with an ice-bath. Pre-cooled TFA (70 ml) was slowly added to the mixture and it was then stirred at RT for 18 h. TFA was evaporated under high-vacuum and the residue taken up in DCM. The resulting mixture was stirred with a saturated aqueous solution of sodium bicarbonate until the pH became neutral. The organic layer was separated and the aqueous layer extracted with DCM (3×150 ml). The combined organic portions were washed with water (2×80 ml), dried over sodium sulfate and concentrated under reduced pressure to yield the crude product. This was purified by column chromatography (silica gel, 25% ethyl acetate/hexanes) to yield the pure title compound as a brown oil. Yield: 62% 3. A suspension of LAH (2 eq.) in THF (4 ml) was added dropwise to a solution of ethyl 3,4-dihydropyrrolo[1,2-a]pyrazine-1-carboxylate (0.52 mmol, 1 eq.) in THF (1 ml) at 0° C. and the mixture was stirred for 1 h. Saturated Na2SO4 solution was added and the mixture was filtered. The solvent was removed and the reaction mixture was taken up in ethyl acetate, dried (Na2SO4) and concentrated to small volume. The crude product was used in the following step without further purification. 4. A solution of 4-methoxy-2,6-dimethylbenzene-1-sulfonyl chloride (1.1 eq.) in DCM (1 ml) was added slowly to a solution of (1,2,3,4-tetrahydropyrrolo[1,2-a]pyrazin-1-yl)methanol (1 eq.) and TEA (2 eq.) in DCM at 0° C. and the mixture was stirred for 1 h. The reaction mixture was concentrated to small volume and purified by column chromatography (silica gel). Yield: 24% 5. Method A: t-Butyl bromoacetate (4.5 eq.) and 35% aqueous KOH solution were added to a solution of (2-(4-methoxy-2,6-dimethylphenylsulfonyl)-1,2,3,4-tetrahydropyrrolo[1,2-a]pyrazin-1-yl)methanol (1 eq.) and TBACl (1 eq.) in toluene (1.5 ml) and the mixture was stirred overnight at RT. The phases were separated and the organic phase was washed with water, dried (Na2SO4) and concentrated to small volume. The crude product was used in the following step without further purification. Method B: To a cooled (0° C.) suspension of NaH (5.48 g, 22.84 mmol, 2.0 eq.) in THF (50 ml) was added dropwise a solution of (2-(4-methoxy-2,6-dimethylphenyl-sulfonyl)-1,2,3,4-tetrahydropyrrolo[1,2-a]pyrazin-1-yl)methanol (4 g, 11.42 mmol, 1.0 eq.) in THF (50 ml) and the reaction mixture was stirred at RT for 1 h. Then a solution of ethylbromoacetate (1.52 ml, 13.70 mmol, 1.2 eq.) in THF (50 ml) was added dropwise to the reaction mixture at 0° C. and it was stirred at RT for 2 h. The reaction mixture was quenched with ammonium chloride solution (50 ml) and filtered through a bed of celite. The filtrate was concentrated under reduced pressure to give the crude product which was purified by column chromatography (silica gel, 15% ethyl acetate/hexanes) to yield the desired product as a white solid. Yield: 64% (3.2 g, 7.34 mmol) 6. Method A: KOH (2 eq.) was added to a solution of ethyl 2-((2-(4-methoxy-2,6-dimethylphenylsulfonyl)-1,2,3,4-tetrahydropyrrolo[1,2-a]pyrazin-1-yl)methoxy)acetate (1 eq.) in MeOH at RT and the mixture was stirred for 3 h. The reaction mixture was concentrated to small volume and the residue taken up in water and washed with ethyl acetate. The aqueous phase was acidified to pH 3 to 4 and extracted with ethyl acetate. The organic phase was extracted with water and saturated sodium chloride solution, dried (Na2SO4), concentrated to small volume and used in the following step without further purification. Method B: Ethyl-2-((2-(4-methoxy-2,6-dimethylphenylsulfonyl)-1,2,3,4-tetrahydropyrrolo[1,2-a]pyrazin-1-yl)methoxy)acetate (4.58 mmol, 1 eq.) was dissolved in ethanol (27 ml) and water (6 ml) and potassium hydroxide (1 M in water, 2 eq.) was added. The resulting mixture was stirred at RT for 16 h. Ethanol was removed in vacuo and the residue was taken up in water and diethylether (20 ml each). The aqueous phase was adjusted to pH 3 with 1 M HCl (aq) and extracted with ethyl acetate (3×30 ml). The combined organic layers were dried over MgSO4 and concentrated in vacuo to yield the desired compound. Yield: 1.89 g (>99%)