sort events by time as well