A method for treating hair, by applicating thereon, includes composition containing binding agent of formula (I), wherein A, B, C and D are reactive fragments, wherefrom each has one or more charges, wherein each from A, B, C and D reactive fragments independently contains a fragment selected from a group consisting of vinyl sulfonyl, and acrylate, methacrylate, styrene, acrylamide, methacrylamide, fumarate, and itaconate groups; R is a linker having two or more charges; at that, said charges are opposite of reactive fragments charges, wherein n=1-10, R is not a polymer, and sum of said charges is zero; reactive fragments are bound with the linker with ionic binding, wherein p, q, r and s always independently represent whole numbers from 0 to 25, and wherein p + q + r + s is equal or more of 2.