sort events by created_at