replacing attrTypeId with typeAttr