For laboratory use, the N-alkylation reaction is often unselective.  A variety of alternative methods have been developed, such as the Delépine reaction, which uses hexamine. The Gabriel synthesis, involving the use of an equivalent to NH, only applies to primary alkyl halides.