Inter conversion of acid derivatives:
Reactive acid derivatives can be transformed to less reactive acid derivatives through nucleophilic substitution. The meaning of this is the acid chlorides can be transformed to acid anhydrides, esters, and amides.
Figure: Nucleophilic substitutions of an acid chloride.
Hydrochloric acid is released in these reactions and this might lead to side reactions. As a result, pyridine or sodium hydroxide might be added in order to mop up the hydrochloric acid shown in figure.