 This modification can also be used for preparing substituted isoquinolines.The aza-Diels–Alder reaction converts imines and dienes to tetrahydropyridines in which the nitrogen atom can be part of the diene or the dienophile.The imine is often generated "in situ" from an amine and formaldehyde.