remove redundant types in record types