A polymer obtainable by a) condensation of at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b), wherein A are independently selected from C 1 -C 6 -alkylene; R 1, R 1*, R 2, R 2*, R 3, R 3*, R 4, R 4*, R 5 and R 5* are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted; and R 6 is selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted; wherein less than 5% by weight of co-condensable compounds different from compounds of formulae (I.a) and/or (I.b), are employed based on the amount of the compounds of formulae (I.a) and/or (I.b), or co-condensation of at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b) with at least one compound selected from polyols of formula Y n, wherein n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms; and b) reacting at least a part of the remaining hydroxy groups and/or, if present, at least a part of the secondary amino groups of the polyether provided in step a) with at least one alkylene oxide selected from the group consisting of epoxyethane, epoxypropane, 1,2-epoxybutane, 2,3-epoxybutane, 1,2-epoxy-2-methylpropane, 1,2-epoxypentane, 2,3-epoxypentane, 1,2-epoxy-2-methylbutane, 2,3-epoxy-2-methylbutane, 1,2-epoxyhexane, 2,3-epoxyhexane, 3,4-epoxyhexane and 1,2-epoxyethylenebenzene; and derivatives obtainable by c) quaternization, protonation, sulphation and/or phosphation of said polymer. a) condensation of at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b), wherein A are independently selected from C 1 -C 6 -alkylene; R 1, R 1*, R 2, R 2*, R 3, R 3*, R 4, R 4*, R 5 and R 5* are independently of one another selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted; and R 6 is selected from hydrogen, alkyl, cycloalkyl or aryl, wherein the last three mentioned radicals may be optionally substituted; wherein less than 5% by weight of co-condensable compounds different from compounds of formulae (I.a) and/or (I.b), are employed based on the amount of the compounds of formulae (I.a) and/or (I.b), or co-condensation of at least one compound selected from N-(hydroxyalkyl)amines of formulae (I.a) and/or (I.b) with at least one compound selected from polyols of formula Y n, wherein n is an integer from 2 to 4 and Y denotes a bivalent, trivalent or tetravalent aliphatic, cycloaliphatic or aromatic radical having 2 to 10 carbon atoms; and b) reacting at least a part of the remaining hydroxy groups and/or, if present, at least a part of the secondary amino groups of the polyether provided in step a) with at least one alkylene oxide selected from the group consisting of epoxyethane, epoxypropane, 1,2-epoxybutane, 2,3-epoxybutane, 1,2-epoxy-2-methylpropane, 1,2-epoxypentane, 2,3-epoxypentane, 1,2-epoxy-2-methylbutane, 2,3-epoxy-2-methylbutane, 1,2-epoxyhexane, 2,3-epoxyhexane, 3,4-epoxyhexane and 1,2-epoxyethylenebenzene; and derivatives obtainable by c) quaternization, protonation, sulphation and/or phosphation of said polymer.