extract addEventModal to seperate file