Formation or introduction of functional groups containing sulfur