Demethylate all tertiary amines in the molecule to convert them into secondary amines.