which comprises reacting a polymer of the general formula wherein x is an integer of 0 or 1, A is one of several specified groups, such as B is one of several specified groups, such as or mixtures thereof, and n is an integer representing the number of repeating monomer units, with (i) a formaldehyde source, and (ii) an unsaturated acid in the presence of an acid catalyst, thereby forming a curab