update event function