improve event_set decorator