convert events to namedtuples