Chemical finishing of textiles