The reaction of primary and secondary haloalkanes with sodium azide produces alkylazides, which by reduction with LiAlH 4 give rise to amides.
Step 1. Formation of the alkylazide
Step 2. Reduction of the azide to the amide with LiAlH 4
Note that the amine formed has the same number of carbons as the starting haloalkane.