So, in the first step, this pi bond acted as a lewis base, donating this pair of electrons and this h atom on this compound on the hydrochloric acid active as a lewis acid, donating that h, donating that empty one s orbital.