change createEvent to addEvent