Complex formation between polyelectrolytes and ionic surfactants