better split out record and sum types