fix event_add, add example