improve seafevents related code