The double bond of cycloartenol (compound 7 in diagram) is methylated by SAM to give a carbocation that undergoes a hydride shift and loses a proton to yield a compound with a methylene side-chain. Both of these steps are catalyzed by sterol C-24 methyltransferase (Step E1 in diagram). Compound 8 is then catalyzed by sterol C-4 demethylase (E2) and loses a methyl group to produce cycloeucalenol. Subsequent to this, the cyclopropane ring is opened with cycloeucalenol cycloisomerase (E3) to form 10 . Compound 10 loses a methyl group and undergoes an allylic isomerization to form Gramisterol 11 . This step is catalyzed by sterol C-14 demethylase (E4), sterol Δ14-reductase (E5), and sterol Δ8-Δ7-isomerase (E6). The last methyl group is removed by sterol demethylase (E7) to form episterol 12 . Episterol 12 is methylated by SAM to produce a second carbocation, which loses a proton to yield 13 . This step is catalyzed by 24-methylenesterol C-methyltransferase (E8). Compound 13 now undergoes reduction by NADPH and modifications in the β-ring to form β-sitosterol.