The invention relates to a method to produce a modified hyperbranched
polyesteramide, containing at least two .beta.-hydroxylamide ester groups
and optionally also a hydroxyalkylamide endgroup, wherein (a) a hydroxy-,
or aminefunctional monomer, oligomer or polymer is contacted with a first
molar excess of a cyclic carboxylic acid anhydride, forming a mixture of
an acid functional ester, respectively an acid functional amide and a
cyclic carboxylic acid anhydride; (b) the mixture is contacted with an
amount of alkanediolamine, wherein the amount is a second molar excess
with respect to the first molar excess. The invention further relates to
a modified hyperbranched polyesteramide containing at least two
.beta.-hydroxylamide ester groups and optionally also a hydroxyalkylamide
endgroup with a degree of polymerisation of more than 19, as well as the
use of these polyesteramides as rheology modifier in gas-oil or in
diesel.