check event function