sort events by chronological order