Formation or introduction of functional groups containing nitrogen