A study of the alkylation and arylation of nitriles with halogen compounds