handle array of event