before modal added