Effective Conversion of Amide to Carboxylic Acid on Polymers of Intrinsic Microporosity (PIM-1) with Nitrous Acid

Carboxylate-functionalised polymers of intrinsic microporosity (C-PIMs) are highly desirable materials for membrane separation applications. The recently reported method to afford C-PIMs was via an extensive base hydrolysis process requiring 360 h. Herein, a novel and effective method to convert PIM-CONH2 to C-PIM using nitrous acid was studied. The chemical structure of C-PIM was characterised by 1H NMR, 13C NMR, FTIR, elemental analysis, UV-Vis, TGA and TGA-MS. Complete conversion from amide to carboxylic acid groups was confirmed. Decarboxylation of C-PIM was also successfully studied by TGA-MS for the first time, with a loss of m/z 44 amu (CO2) observed at the first degradation stage. TGA also revealed decreased thermal stability of C-PIM relative to PIM-CONH2 under both N2 and air atmosphere. Gel permeation chromatography (GPC) analysis showed continuous molecular weight degradation of C-PIM with extended reaction time. Aromatic nitration was also observed as a side reaction in some cases.


Introduction
The unprecedented energy consumption of the past century has led to dramatic increases in atmospheric CO 2 concentration [1][2][3]. Because of this, there is a growing demand for efficient and cost-effective CO 2 separation and capture technology [1][2][3]. In addition to the current chemical and thermal separation processes such as absorption, cryogenic distillation and pressure swing adsorption (PSA), membrane separation is slowly gaining ground in oil refineries and petrochemical plants due to its low energy consumption and environmental friendliness [4][5][6][7]. In the past three decades, polymeric membrane separations have exhibited strong growth rates and now have been installed for N 2 /O 2 and CO 2 /CH 4 separations plus H 2 recovery from HCs, etc. Polymeric membranes enjoy low cost fabrication, easy scale-up, flexibility and mild operation conditions [8].
A unique class of microporous organic material (i.e., Polymers of Intrinsic Microporosity (PIMs)) was first developed by Budd and McKeown in 2004 [9]. Since the chemical structures and physical properties of the membrane materials influence their corresponding permeability and permselectivity, various new PIM structures and synthetics methods have been reported, in order to improve the gas separation performance [10][11][12][13][14][15]. The nitrile (-CN) group of PIM-1 is the most popular target for transformation, and has been converted to various CO 2 -philic functionalities such as nitrogen-containing groups [16][17][18][19][20][21][22] and carboxylic acid-based functional groups [23][24][25][26][27][28][29][30]. Carboxylate functionalised PIMs (C-PIMs) were inspired by the well-known carboxylic acid-containing polyimide based on the 6FDA-DABA, which exhibits superior gas separation performance after decarboxylation and/or crosslinking [31]. The first synthetic attempt toward C-PIM was reported in 2009 [24]. The synthesis was based on hydrolysis of the nitrile group under alkaline conditions. The resultant polymer showed an overall increase in permselectivity and decreased permeability [24]. However, in 2014, Satilmis et al. pointed out that the base-hydrolysed PIM-1 materials contained a mixture of amide, carboxylic acid, ammonium carboxylate and sodium carboxylate functional groups where the actual percentage of carboxylic acid was less than 20% [32]. Even after extensive base-hydrolysis, only 51% carboxylation was achieved [32]. In 2017, Santoso et al. reported a critical update on the characterisation of C-PIM [33]. Based on the spectroscopic data obtained from FT-IR, 1 H NMR, 13 C NMR, and 1 H-15 N HSQC, the amide and carboxylic acid groups were unambiguously distinguishable. The multiple proton signals between 7.0-8.5 ppm in 1 H NMR were correctly assigned to the active amide protons (-C(=O)-NH 2 ) whereas the carboxylic acid proton (-C(=O)-OH) is located further downfield in the range of 13.0-14.0 ppm. Moreover, the carbonyl stretch vibration at 1666 cm −1 observed by FTIR belongs to the amide carbonyl, whereas the carboxylic acid carbonyl stretch is located at 1720 cm −1 [33].
Most recently, Jeon et al. successfully obtained a fully converted C-PIM (>92 mol % COOH content) after an exhaustive 360 h (15 days) base-hydrolysis [34]. The resulting C-PIM film exhibited outstanding selectivity of 53.6 for CO 2 /N 2 gas pair [34]. However, this extremely slow reaction rate is not ideal and could be a barrier to large scale industrial implementation. During the base hydrolysis process, the nitrile to amide conversion is relatively fast. The bottleneck appears to be the slow conversion from the amide to carboxylic acid [35]. The hydroxide (OH − ) attacks the carbonyl carbon of the benzamide to give a tetrahedral intermediate. Since [23]. However, our group failed to reproduce the original experimental results.
A new synthesis of C-PIM via a fast and efficient reaction route is therefore required. As summarised in Table 1, herein we report an effective and fast method to convert amide-containing PIM-1 (i.e., PIM-CONH 2 ) to C-PIM via reaction with nitrous acid. A combination of FTIR, 1 H, 13 C NMR, elemental analysis, UV-Vis, GPC, TGA, and TGA-MS were used to characterise the resulting C-PIM.
NMR spectra were recorded on Bruker DRX 400 MHz NMR spectrometers at 25 • C. The measurement frequencies for 1 H NMR was 399.89 and 400.13 MHz. The chemical shifts for the NMR solvents reported for 1 H and 13 C in parts per million (ppm) are referenced to 7.26 ppm and 77.0 ppm for CDCl 3 , 2.5 ppm and 39.5 ppm for DMSO-d 6 , 1.7 ppm with 3.6 ppm and 67.2 ppm with 25.3 ppm for THF-d 8 , respectively. Broadband decoupled mode was used for recording 13 C NMR spectra.
Infrared spectra were recorded on Nicolet iS50 FT-IR Spectrometer with a Universal ATR Sampling Accessory. Each sample was scanned 32 times at resolution of 4 cm −1 .
UV-Vis spectra were recorded on a Shimadzu UV-2700 spectrophotometer. Pure solvents were used for baseline correction. For these measurements, PIM-CONH 2 and C-PIM were dissolved in DMSO and THF at a concentration of 0.1 mg/mL.
Elemental analysis was performed in the Campbell Microanalytical Laboratory located at University of Otago. All measured microanalysis results have an uncertainty of ±0.4%.
Thermogravimetric analysis (TGA) was performed using a TG 5000 instrument. For polymer thermal degradation analysis, samples were heated from room temperature to 100 • C at a rate of 10 • C/min followed by isotherm for 60 min to remove water and solvents and then heated to 800 • C at a rate of 10 • C/min. Identical conditions were used for TGA measurements under nitrogen flow and air flow. For the thermal decarboxylation experiment, C-PIM was heated from room temperature to 100 • C at a rate of 10 • C/min followed by isotherm for 60 min and then heated to 350 • C at a rate of 10 • C/min followed by isotherm for 60 min. The leftover material was further characterised by FTIR.
Thermogravimetric analysis was coupled to a gas chromatography mass spectrometer (TG-GC-MS), which was used to analyse the gases evolved during pyrolysis. TG measurement was carried out using a Netzsch STA449 F5 Jupiter ® instrument. The experiments were carried out in a helium atmosphere flowing at 60 mL/min (40 mL/min directly to the furnace +20 mL to the furnace via the mass balance). High purity Helium 5.0 gas (99.999%) was supplied by Coregas. The sample insertion temperature was 40 • C followed by isotherm for 10 min. Samples were then heated to 1000 • C at a rate of 10 • C/min followed by isotherm for 20 min. Crucible cleaning was achieved by influx of 10 mL/min oxygen in the purge gas and cooling to 40 • C. The GC-MS configuration measurement range from 5 to 100 m/z was analysed using an Agilent 7890 GC with Agilent MSD 5977 EI.
We previously reported the synthesis of PIM-CONH 2 [36]. Typically, dimethyl sulfoxide (DMSO) (30.0 mL) was added to fine PIM-1 powder (0.500 g) and stirred at moderate speed for 1 h at R.T. Potassium carbonate (K 2 CO 3 ) (0.500 g, 3.62 mmol) was then added to the stirring mixture to give a slightly basic pH 9-10 solution, followed by drop-wise addition of 25% hydrogen peroxide (H 2 O 2 ) (5.0 mL, 32.64 mmol). The reaction was performed at RT for 24 h. Water (250 mL) was added at the end of the reaction and was further stirred rapidly overnight. A light-yellow polymer was collected by vacuum filtration and washed with water and methanol. The solid was dried in oven at 25 • C for 24 h to give PIM-CONH 2 (0.48 g, yield > 80%). 1  Synthesis of C-PIM using nitrous acid: In a pressure tube, PIM-CONH 2 (50 mg) was suspended in a stirred mixture of MeCN (0.8 mL) and 2M aqueous H 2 SO 4 (0.6 mL, 1.2 mmol). NaNO 2 (0.150 g, 2.4 mmol) was added portion-wise at 0 • C. After addition, the cap was screwed tightly, and the reaction vessel immersed in oil at 90 • C for 6 h. The reaction mixture was then diluted with water (4 mL) and extracted with ethyl acetate (8 mL). The organic layer was then concentrated in vacuo. The crude product was then dissolved in THF, filtered and solution concentrated in vacuo and dried in a vacuum oven at 70 • C overnight. The crude polymer was re-dissolved in THF, precipitated by addition of MeOH and then dried in vacuum to give C-PIM (35 mg, yield = 70%) as a dark yellow powder which was fluorescent under UV. 1

Results
Previously reported post-polymerisation modifications of PIM-1 to C-PIM have utilised either acid or base-catalysed hydrolysis procedures [23,24,[32][33][34]37]. In both pathways, PIM-CONH 2 is formed as an intermediate. This most likely results in the co-existence of two distinct functional groups (amide and carboxylic acid) on a single polymer chain. Furthermore, when using the basic conditions reported by Jeon et al. the C-PIM is obtained after an extremely long reaction time (15 days) [34]. Based on these issues, we have developed a two-step approach to C-PIM as shown in Scheme 1a. PIM-1 is first converted to PIM-CONH 2 using hydrogen peroxide. Pure PIM-CONH 2 is purified and isolated. In the second step, PIM-CONH 2 undergoes reaction with nitrous acid (HNO 2 ) to afford C-PIM. Since nitrous acid is unstable, it is prepared in situ by the reaction of sodium nitrite and dilute acid in the absence of heat. We have previously reported the detailed synthesis of PIM-CONH 2 [36]. Here we only focus on the second reaction. Optimisation of reaction solvent, the choice of the type of acid and acidity, and reaction time are discussed in detail below.
Pioneered by George Olah et al., nitrous acid has found use as an alternative method to convert amide compounds that are resistant to standard hydrolysis to the corresponding carboxylic acids [38]. In 1965, Olah et al. reported the conversion sterically hindered benzamides and benzenesulfonamides to the corresponding acids by treatment with nitrosonium tetrafluoroborate at 50 • C in acetonitrile, in high yield (>80%) [38]. The amide can react with the nitrous acid to give the corresponding carboxylic acid and nitrogen gas. Scheme 1b gives the proposed reaction mechanism. The key reactive species is the highly electrophilic nitrosonium (NO + ) cation, which is readily added to amide nitrogen, resulting in the formation of the corresponding N-nitrosamide. The N-nitrosamide tautomerises to the diazoic acid which forms a diazonium cation by losing a molecule of water. The diazonium cation decomposes rapidly through evolution of nitrogen and forms acyl carbocation. Finally, the acyl carbocation is quenched by water to give the carboxylic acid product. days) [34]. Based on these issues, we have developed a two-step approach to C-PIM as shown in Scheme 1a. PIM-1 is first converted to PIM-CONH2 using hydrogen peroxide. Pure PIM-CONH2 is purified and isolated. In the second step, PIM-CONH2 undergoes reaction with nitrous acid (HNO2) to afford C-PIM. Since nitrous acid is unstable, it is prepared in situ by the reaction of sodium nitrite and dilute acid in the absence of heat. We have previously reported the detailed synthesis of PIM-CONH2 [36]. Here we only focus on the second reaction. Optimisation of reaction solvent, the choice of the type of acid and acidity, and reaction time are discussed in detail below. Pioneered by George Olah et al., nitrous acid has found use as an alternative method to convert amide compounds that are resistant to standard hydrolysis to the corresponding carboxylic acids [38]. In 1965, Olah et al. reported the conversion sterically hindered benzamides and benzenesulfonamides to the corresponding acids by treatment with nitrosonium tetrafluoroborate at 50 °C in acetonitrile, in high yield (>80%) [38]. The amide can react with the nitrous acid to give the corresponding carboxylic acid and nitrogen gas. Scheme 1b gives the proposed reaction mechanism.
The key reactive species is the highly electrophilic nitrosonium (NO + ) cation, which is readily added to amide nitrogen, resulting in the formation of the corresponding N-nitrosamide. The N-nitrosamide tautomerises to the diazoic acid which forms a diazonium cation by losing a molecule of water. The diazonium cation decomposes rapidly through evolution of nitrogen and forms acyl carbocation. Finally, the acyl carbocation is quenched by water to give the carboxylic acid product. First, three common organic solvents: ethyl acetate (EtOAc), tetrahydrofuran (THF) and acetonitrile (MeCN) were tested as reaction media. The reaction temperature was adjusted with the solvent's boiling point. Therefore, the temperature was set at 70 °C for THF, 80 °C for EtOAc and 90 °C for MeCN. At the beginning of the reaction, PIM-CONH2 was not soluble in any of these solvents. As the reaction proceeded, the reaction mixtures became partially soluble in EtOAc and MeCN and fully soluble in THF. Figure 1 shows the effect of solvent on the reaction of PIM-CONH2 with NaNO2 and 2M H2SO4 for 6 h. Conversion was observed in all three solvents as assessed by FTIR which exhibited a carboxylic acid carbonyl stretching peak at 1720 cm −1 . However, the experiments carried out in EtOAc and THF still showed the peak at 1666 cm −1 which corresponds to the stretch vibration of amide carbonyl. Furthermore, a new peak at 1545 cm −1 was present in these two solvent systems. Scheme 1. (a) Two-step synthesis of C-PIM via PIM-CONH 2 . (b) Proposed reaction mechanism for the conversion of amides to carboxylic acid using nitrous acid [38].
First, three common organic solvents: ethyl acetate (EtOAc), tetrahydrofuran (THF) and acetonitrile (MeCN) were tested as reaction media. The reaction temperature was adjusted with the solvent's boiling point. Therefore, the temperature was set at 70 • C for THF, 80 • C for EtOAc and 90 • C for MeCN. At the beginning of the reaction, PIM-CONH 2 was not soluble in any of these solvents. As the reaction proceeded, the reaction mixtures became partially soluble in EtOAc and MeCN and fully soluble in THF. Figure 1 shows the effect of solvent on the reaction of PIM-CONH 2 with NaNO 2 and 2M H 2 SO 4 for 6 h. Conversion was observed in all three solvents as assessed by FTIR which exhibited a carboxylic acid carbonyl stretching peak at 1720 cm −1 . However, the experiments carried out in EtOAc and THF still showed the peak at 1666 cm −1 which corresponds to the stretch vibration of amide carbonyl. Furthermore, a new peak at 1545 cm −1 was present in these two solvent systems. In prior literature, this type of signal was found in nitrated polyphenylene oxide (PPO-NO 2 ) reported by Bhole et al. [39] and nitrated poly (diphenylacetylene) reported by Sakaguchi et al. [40]. Their FTIR showed absorption peaks at 1532 cm −1 and 1364 cm −1 , which corresponded to the aromatic -NO 2 antisymmetric stretch and -NO 2 symmetrical stretch, respectively. This is therefore strong evidence that nitration of PIM-CONH 2 has also occurred in EtOAc and THF. On the basis of these results, MeCN is best suited for the present reaction, in which the product gave the most intense carboxylic acid carbonyl stretching peak, with minimal amide carbonyl stretching. Notably no nitration side reaction occurred in MeCN. In prior literature, this type of signal was found in nitrated polyphenylene oxide (PPO-NO2) reported by Bhole et al. [39] and nitrated poly (diphenylacetylene) reported by Sakaguchi et al. [40]. Their FTIR showed absorption peaks at 1532 cm −1 and 1364 cm −1 , which corresponded to the aromatic -NO2 antisymmetric stretch and -NO2 symmetrical stretch, respectively. This is therefore strong evidence that nitration of PIM-CONH2 has also occurred in EtOAc and THF. On the basis of these results, MeCN is best suited for the present reaction, in which the product gave the most intense carboxylic acid carbonyl stretching peak, with minimal amide carbonyl stretching. Notably no nitration side reaction occurred in MeCN. Secondly, besides the combination of sodium nitrite with sulfuric acid, organic acids such as acetic acid and p-toluenesulfonic acid (PTSA) with sodium nitrite [41][42][43] were tested. The use of organic acids was expected to be more compatible with reaction solvent (MeCN) while still facilitating the generation of nitrous acid. Figure 2 shows the effect of the acid on the reaction outcome using NaNO2 in MeCN. All acids were made into the same concentration of 2M and performed under otherwise identical reaction conditions (90 °C for 6 h). A lower temperature reaction at 50 °C was also performed for PTSA in accordance with literature precedent [43]. The acetic acid system showed no conversion, as the parent amide absorption peak at 1666 cm −1 was still intact and no carboxylic acid carbonyl absorption peak at 1720 cm −1 was observed. This result was not surprising since when H2SO4 and PTSA were mixed with sodium nitrite, nitrogen gas was evolved which confirmed that nitrous acid had been produced, but this was not the case with acetic acid. This is likely due to the lower strength of acetic acid compared to the other acids. The temperature dependence of the reaction was also observed in the reaction performed using PTSA. The reaction with PTSA at 50 °C is not as effective as the one at 90 °C. At 50 °C, the amide stretch at 1666 cm −1 was still the dominant absorption in the IR spectrum, with a very weak carboxylic acid carbonyl absorption peak at 1720 cm −1 . Comparing H2SO4 and PTSA, the former resulted in a higher conversion rate.  Secondly, besides the combination of sodium nitrite with sulfuric acid, organic acids such as acetic acid and p-toluenesulfonic acid (PTSA) with sodium nitrite [41][42][43] were tested. The use of organic acids was expected to be more compatible with reaction solvent (MeCN) while still facilitating the generation of nitrous acid. Figure 2 shows the effect of the acid on the reaction outcome using NaNO 2 in MeCN. All acids were made into the same concentration of 2M and performed under otherwise identical reaction conditions (90 • C for 6 h). A lower temperature reaction at 50 • C was also performed for PTSA in accordance with literature precedent [43]. The acetic acid system showed no conversion, as the parent amide absorption peak at 1666 cm −1 was still intact and no carboxylic acid carbonyl absorption peak at 1720 cm −1 was observed. This result was not surprising since when H 2 SO 4 and PTSA were mixed with sodium nitrite, nitrogen gas was evolved which confirmed that nitrous acid had been produced, but this was not the case with acetic acid. This is likely due to the lower strength of acetic acid compared to the other acids. The temperature dependence of the reaction was also observed in the reaction performed using PTSA. The reaction with PTSA at 50 • C is not as effective as the one at 90 • C. At 50 • C, the amide stretch at 1666 cm −1 was still the dominant absorption in the IR spectrum, with a very weak carboxylic acid carbonyl absorption peak at 1720 cm −1 . Comparing H 2 SO 4 and PTSA, the former resulted in a higher conversion rate. In prior literature, this type of signal was found in nitrated polyphenylene oxide (PPO-NO2) reported by Bhole et al. [39] and nitrated poly (diphenylacetylene) reported by Sakaguchi et al. [40]. Their FTIR showed absorption peaks at 1532 cm −1 and 1364 cm −1 , which corresponded to the aromatic -NO2 antisymmetric stretch and -NO2 symmetrical stretch, respectively. This is therefore strong evidence that nitration of PIM-CONH2 has also occurred in EtOAc and THF. On the basis of these results, MeCN is best suited for the present reaction, in which the product gave the most intense carboxylic acid carbonyl stretching peak, with minimal amide carbonyl stretching. Notably no nitration side reaction occurred in MeCN. Secondly, besides the combination of sodium nitrite with sulfuric acid, organic acids such as acetic acid and p-toluenesulfonic acid (PTSA) with sodium nitrite [41][42][43] were tested. The use of organic acids was expected to be more compatible with reaction solvent (MeCN) while still facilitating the generation of nitrous acid. Figure 2 shows the effect of the acid on the reaction outcome using NaNO2 in MeCN. All acids were made into the same concentration of 2M and performed under otherwise identical reaction conditions (90 °C for 6 h). A lower temperature reaction at 50 °C was also performed for PTSA in accordance with literature precedent [43]. The acetic acid system showed no conversion, as the parent amide absorption peak at 1666 cm −1 was still intact and no carboxylic acid carbonyl absorption peak at 1720 cm −1 was observed. This result was not surprising since when H2SO4 and PTSA were mixed with sodium nitrite, nitrogen gas was evolved which confirmed that nitrous acid had been produced, but this was not the case with acetic acid. This is likely due to the lower strength of acetic acid compared to the other acids. The temperature dependence of the reaction was also observed in the reaction performed using PTSA. The reaction with PTSA at 50 °C is not as effective as the one at 90 °C. At 50 °C, the amide stretch at 1666 cm −1 was still the dominant absorption in the IR spectrum, with a very weak carboxylic acid carbonyl absorption peak at 1720 cm −1 . Comparing H2SO4 and PTSA, the former resulted in a higher conversion rate.   After identifying the best reaction solvent and acid, the reaction kinetics were monitored by FTIR. Figure 3 shows the reaction progression between 2 to 48 h. Remarkably, under the optimised reaction conditions (MeCN, NaNO 2 and H 2 SO 4 at 90 • C) the conversion from amide to carboxylic acid was pleasingly fast. Within 2 h, the amide band at 1666 cm −1 had nearly disappeared and was taken over by the carboxylic acid peak at 1720 cm −1 . There was no obvious change in the intensity of the C=O band of carboxylic acid after 6 h. Clearly, the reaction kinetics for the nitrous acid reaction are much faster than acid or base catalysed hydrolysis.

Membranes 2018, 8, x FOR PEER REVIEW 6 of 13
After identifying the best reaction solvent and acid, the reaction kinetics were monitored by FTIR. Figure 3 shows the reaction progression between 2 to 48 h. Remarkably, under the optimised reaction conditions (MeCN, NaNO2 and H2SO4 at 90 °C) the conversion from amide to carboxylic acid was pleasingly fast. Within 2 h, the amide band at 1666 cm −1 had nearly disappeared and was taken over by the carboxylic acid peak at 1720 cm −1 . There was no obvious change in the intensity of the C=O band of carboxylic acid after 6 h. Clearly, the reaction kinetics for the nitrous acid reaction are much faster than acid or base catalysed hydrolysis. The 1 H NMR spectra were also used to probe the reaction kinetics. Figure    The 1 H NMR spectra were also used to probe the reaction kinetics. Figure  After identifying the best reaction solvent and acid, the reaction kinetics were monitored by FTIR. Figure 3 shows the reaction progression between 2 to 48 h. Remarkably, under the optimised reaction conditions (MeCN, NaNO2 and H2SO4 at 90 °C) the conversion from amide to carboxylic acid was pleasingly fast. Within 2 h, the amide band at 1666 cm −1 had nearly disappeared and was taken over by the carboxylic acid peak at 1720 cm −1 . There was no obvious change in the intensity of the C=O band of carboxylic acid after 6 h. Clearly, the reaction kinetics for the nitrous acid reaction are much faster than acid or base catalysed hydrolysis. The 1 H NMR spectra were also used to probe the reaction kinetics. Figure    The conversion of the amide to the carboxylic acid was also verified by elemental analysis (Table 2). Increased percentages of hydrogen atoms (4.47% to 5.33%) and oxygen atoms (14.69% to 23.90%) were observed from the conversion of PIM-1 to PIM-CONH 2 , where four additional hydrogen atoms and two additional oxygen atoms were gained per repeat unit. From PIM-CONH 2 to C-PIM, the percentage of hydrogen atoms was decreased (5.33% to 4.80%) with an increase in oxygen atoms (23.90% to 30.74%), where two hydrogen atoms were lost and two more oxygen atoms were gained for each repeat unit in C-PIM polymer. Most significantly, the decrease of nitrogen content from 5.24% in PIM-CONH 2 to 0.91% in C-PIM indicated successful conversion of the amide groups to carboxylic acid functionalities. The solubility of C-PIM in common organic solvents is very important for applications involving membrane casting. In Table 3, the solubility of PIM-1, PIM-CONH 2, and C-PIM are compared. It was well known that PIM-1 was readily soluble in tetrahydrofuran (THF), dichloromethane (DCM), and chloroform (CHCl 3 ), but insoluble in polar aprotic solvents such as dimethyl formamide (DMF), dimethyl acetamide (DMAc), and N-methyl pyrrolidone (NMP). In contrast to PIM-1, PIM-CONH 2 showed good solubility in polar aprotic solvents such as DMF, DMAc, NMP, and DMSO. The C-PIM prepared in this work exhibited wide solubility in many common solvents except less polar ones such as DCM and CHCl 3 . Interestingly, C-PIM was even soluble in acetone. The higher solubility of C-PIM than PIM-CONH 2 was attributed to favourable interactions between the carboxylic acid groups of C-PIM with the solvent molecules. Table 3. Solubility comparison of PIM-1, PIM-CONH 2 and C-PIM in organic solvents. DCM  soluble  insoluble  insoluble  EtOAc  insoluble  insoluble  partially soluble  CHCl 3  soluble  insoluble  insoluble  THF  soluble  partially soluble  soluble  DMF  insoluble  soluble  soluble  DMAc  insoluble  soluble  soluble  NMP  insoluble  soluble  soluble  MeOH  insoluble  partially soluble  partially soluble  MeCN  insoluble  insoluble  partially soluble  EtOH  insoluble  insoluble  partially soluble  Acetone  insoluble  insoluble  soluble  DMSO  insoluble  soluble  soluble The UV-Vis spectra of PIM-CONH 2 and C-PIM with same concentration (0.1 mg/mL) are shown in Figure 5. For the starting polymer PIM-CONH 2 , the absorption maximum (λ max ) was at 306 nm corresponding to the π-π* transition while the shoulder peak at 326 nm corresponds to the n-π* transition of the carbonyl group. For the product polymer C-PIM, λ max at 304 nm corresponds to the π-π* transition and λ max at 339 nm arise from the n to π* transition. A red shift of about 13 nm was observed for the n-π* transition (-C=O) of C-PIM compared to that of PIM-CONH 2 . This indicated that the energy gap between n orbital and π* orbital for C-PIM was smaller than that of PIM-CONH 2 . The thermal stability of C-PIM and PIM-CONH2 were investigated by TGA under nitrogen and air, respectively. Figure 6a shows the pyrolysis behaviour of PIM-CONH2 and C-PIM under a nitrogen atmosphere. Both C-PIM and PIM-CONH2 clearly showed two distinct stages of thermal degradation. Subsequently, two main peaks can be clearly resolved from the differential TGA curve (DTG). In PIM-CONH2, the first degradation stage is associated with a mass loss of ~15% in the range of 270-450 °C. This was attributed to the release of the labile pendant group (i.e., amide). During the second degradation stage, a mass loss of ~25% was observed in the range of 450-600 °C which was ascribed to decomposition of the PIM backbone. The C-PIM gave a similar TGA thermogram with two degradation stages. However, the conversion of the amide group to the carboxylic acid group decreased in thermal stability. Under nitrogen, the onset temperature for decarboxylation was measured to be 250 °C, with a major loss of CO2 at 307 °C. A total mass loss of 16% was observed in the range of 250-370 °C corresponding to the decarboxylation. As the theoretical value for full removal of the side chain is 18%, this means that near-total decarboxylation had occurred. This decarboxylation result is in agreement with the decarboxylation of polythiophene ester reported by Søndergaard et al. [44]. The second degradation stage of C-PIM occurred between 450-600 °C, and was associated with a mass loss of 20%. Moreover, as analysed from the DTG curves, in the first stage of degradation (loss of pendant group), the maximum mass loss rate (rmax) of the C-PIM was rmax = 0.31 %/°C at 307 °C which was twice the value of PIM-CONH2 with rmax = 0.16 %/°C at 342 °C. This suggests that the rate of decarboxylation is faster than the de-amidation rate. In the second stage of degradation (main chain The thermal stability of C-PIM and PIM-CONH 2 were investigated by TGA under nitrogen and air, respectively. Figure 6a shows the pyrolysis behaviour of PIM-CONH 2 and C-PIM under a nitrogen atmosphere. Both C-PIM and PIM-CONH 2 clearly showed two distinct stages of thermal degradation. Subsequently, two main peaks can be clearly resolved from the differential TGA curve (DTG). In PIM-CONH 2 , the first degradation stage is associated with a mass loss of~15% in the range of 270-450 • C. This was attributed to the release of the labile pendant group (i.e., amide). During the second degradation stage, a mass loss of~25% was observed in the range of 450-600 • C which was ascribed to decomposition of the PIM backbone. The C-PIM gave a similar TGA thermogram with two degradation stages. However, the conversion of the amide group to the carboxylic acid group decreased in thermal stability. Under nitrogen, the onset temperature for decarboxylation was measured to be 250 • C, with a major loss of CO 2 at 307 • C. A total mass loss of 16% was observed in the range of 250-370 • C corresponding to the decarboxylation. As the theoretical value for full removal of the side chain is 18%, this means that near-total decarboxylation had occurred. This decarboxylation result is in agreement with the decarboxylation of polythiophene ester reported by Søndergaard et al. [44]. The second degradation stage of C-PIM occurred between 450-600 • C, and was associated with a mass loss of 20%. The thermal stability of C-PIM and PIM-CONH2 were investigated by TGA under nitrogen and air, respectively. Figure 6a shows the pyrolysis behaviour of PIM-CONH2 and C-PIM under a nitrogen atmosphere. Both C-PIM and PIM-CONH2 clearly showed two distinct stages of thermal degradation. Subsequently, two main peaks can be clearly resolved from the differential TGA curve (DTG). In PIM-CONH2, the first degradation stage is associated with a mass loss of ~15% in the range of 270-450 °C. This was attributed to the release of the labile pendant group (i.e., amide). During the second degradation stage, a mass loss of ~25% was observed in the range of 450-600 °C which was ascribed to decomposition of the PIM backbone. The C-PIM gave a similar TGA thermogram with two degradation stages. However, the conversion of the amide group to the carboxylic acid group decreased in thermal stability. Under nitrogen, the onset temperature for decarboxylation was measured to be 250 °C, with a major loss of CO2 at 307 °C. A total mass loss of 16% was observed in the range of 250-370 °C corresponding to the decarboxylation. As the theoretical value for full removal of the side chain is 18%, this means that near-total decarboxylation had occurred. This decarboxylation result is in agreement with the decarboxylation of polythiophene ester reported by Søndergaard et al. [44]. The second degradation stage of C-PIM occurred between 450-600 °C, and was associated with a mass loss of 20%. Moreover, as analysed from the DTG curves, in the first stage of degradation (loss of pendant group), the maximum mass loss rate (rmax) of the C-PIM was rmax = 0.31 %/°C at 307 °C which was twice the value of PIM-CONH2 with rmax = 0.16 %/°C at 342 °C. This suggests that the rate of decarboxylation is faster than the de-amidation rate. In the second stage of degradation (main chain Moreover, as analysed from the DTG curves, in the first stage of degradation (loss of pendant group), the maximum mass loss rate (r max ) of the C-PIM was r max = 0.31 %/ • C at 307 • C which was twice the value of PIM-CONH 2 with r max = 0.16 %/ • C at 342 • C. This suggests that the rate of decarboxylation is faster than the de-amidation rate. In the second stage of degradation (main chain breakdown), C-PIM has r max = 0.32 %/ • C at 536 • C while PIM-CONH 2 has a very large r max = 0.54 %/ • C at 526 • C. This interesting DTG data might reveal that the C-PIM polymer after decarboxylation stage is relatively more stable as a result of decarboxylation-induced aryl radical homo-coupling (i.e., cross-linking). Figure 6b shows the pyrolysis behaviour of PIM-CONH 2 and C-PIM under an air atmosphere. The C-PIM still showed decarboxylation in the range of 270-350 • C. This indicates that decarboxylation of C-PIM was not affected by the oxidative environment. For PIM-CONH 2 , there was no obvious first stage degradation. Both C-PIM and PIM-CONH 2 decomposed completely as 100% weight loss was observed at the end of pyrolysis at 800 • C, whereas under the N 2 atmosphere,~50% char yields were obtained.

PIM-1 PIM-CONH 2 C-PIM Obtained in This Work
For the first time, TGA-MS was used to analyse the composition of the evolved gases from C-PIM and PIM-CONH 2 during TGA scans, focusing on their first degradation stages (decarboxylation and de-amidation, respectively). In Figure 7a, the DTG curve of PIM-CONH 2 is overlaid with MS signal for the molecular ion with m/z 43 amu evolved during the TGA scan. A mass loss of 43 amu (CONH) showed the best match with the PIM-CONH 2 first DTG peak at 350 • C. This confirmed that the first mass loss peak resulted from release of the amide group. In Figure 7b, the DTG curve of C-PIM is overlaid with the MS signal for the molecular ion of m/z 44 amu evolved during the TGA scan. The MS peak associated with the molecular weight of 44 (CO 2 ) showed the perfect match with the C-PIM first DTG peak at 300 • C, which confirms that the first mass loss peak is due to the decarboxylation of C-PIM. breakdown), C-PIM has rmax = 0.32 %/°C at 536 °C while PIM-CONH2 has a very large rmax = 0.54 %/°C at 526 °C. This interesting DTG data might reveal that the C-PIM polymer after decarboxylation stage is relatively more stable as a result of decarboxylation-induced aryl radical homo-coupling (i.e., cross-linking). Figure 6b shows the pyrolysis behaviour of PIM-CONH2 and C-PIM under an air atmosphere. The C-PIM still showed decarboxylation in the range of 270-350 °C. This indicates that decarboxylation of C-PIM was not affected by the oxidative environment. For PIM-CONH2, there was no obvious first stage degradation. Both C-PIM and PIM-CONH2 decomposed completely as 100% weight loss was observed at the end of pyrolysis at 800 °C, whereas under the N2 atmosphere, ~50% char yields were obtained.
For the first time, TGA-MS was used to analyse the composition of the evolved gases from C-PIM and PIM-CONH2 during TGA scans, focusing on their first degradation stages (decarboxylation and de-amidation, respectively). In Figure 7a, the DTG curve of PIM-CONH2 is overlaid with MS signal for the molecular ion with m/z 43 amu evolved during the TGA scan. A mass loss of 43 amu (CONH) showed the best match with the PIM-CONH2 first DTG peak at 350 °C. This confirmed that the first mass loss peak resulted from release of the amide group. In Figure 7b, the DTG curve of C-PIM is overlaid with the MS signal for the molecular ion of m/z 44 amu evolved during the TGA scan. The MS peak associated with the molecular weight of 44 (CO2) showed the perfect match with the C-PIM first DTG peak at 300 °C, which confirms that the first mass loss peak is due to the decarboxylation of C-PIM.     Figure 8 compares the FTIR of C-PIM samples before and after pyrolysis. The pyrolysed C-PIM sample was held isothermally at 350 • C for 60 min under nitrogen. The pyrolysis residue clearly shows the disappearance of the original carboxylic acid C=O stretch at 1720 cm −1 . This further confirmed that the first degradation stage is the decarboxylation of C-PIM. Figure 8 compares the FTIR of C-PIM samples before and after pyrolysis. The pyrolysed C-PIM sample was held isothermally at 350 °C for 60 min under nitrogen. The pyrolysis residue clearly shows the disappearance of the original carboxylic acid C=O stretch at 1720 cm -1 . This further confirmed that the first degradation stage is the decarboxylation of C-PIM.

Discussion
The film forming ability and mechanical properties of PIMs are important for membrane applications. The C-PIM produced via acid hydrolysis reported by Weng et al. [23] and the base hydrolysis reported by Jeon et al. [34] had the ability to form free standing isotropic films. Film casting of C-PIM from this work was attempted. But unfortunately, the C-PIM produced via nitrous acid route was unable to form a flexible film. It appears likely that the main reason for this was that the starting material PIM-CONH 2 was unable to form a film, so the C-PIM carried on this disadvantage. Moreover, the GPC analysis of C-PIM in THF (Figure 9) revealed that molecular weight degradation had occurred during the nitrous acid reaction. It was observed that longer reaction times, were associated with decreases in molecular weight.

Discussion
The film forming ability and mechanical properties of PIMs are important for membrane applications. The C-PIM produced via acid hydrolysis reported by Weng et al. [23] and the base hydrolysis reported by Jeon et al. [34] had the ability to form free standing isotropic films. Film casting of C-PIM from this work was attempted. But unfortunately, the C-PIM produced via nitrous acid route was unable to form a flexible film. It appears likely that the main reason for this was that the starting material PIM-CONH2 was unable to form a film, so the C-PIM carried on this disadvantage. Moreover, the GPC analysis of C-PIM in THF (Figure 9) revealed that molecular weight degradation had occurred during the nitrous acid reaction. It was observed that longer reaction times, were associated with decreases in molecular weight. In our approach, another side reaction is the aromatic ring nitration. In the early discussion of the reaction solvent choice, aromatic nitration was observed for the reactions conducted in both THF and EtOAc. Aromatic nitration is caused by the nitronium ion (NO2 + ) in the reaction system. A typical example of nitration of polystyrene is reported by Philippides et al. where they used nitric acid and sulfuric acid mixture [45]. In the nitrous acid reaction, it seems that nitric acid (HNO3) was also inevitably produced, which in turn resulted in the formation of NO2 + .

Conclusions
A novel and effective method to convert PIM-1 to C-PIM was studied. The C-PIM was successfully prepared from PIM-CONH2 using nitrous acid as a key reagent. The optimum reaction conditions were NaNO2, H2SO4 in MeCN at 90 °C for 6 h. The resulting C-PIM was soluble in various organic solvents such as THF, acetone, DMSO and NMP. The chemical structure of C-PIM was characterised by 1 H NMR, 13 C NMR, FTIR, elemental analysis, UV-Vis, TGA and TGA-MS. These measurements confirmed complete conversion of the amide groups to carboxylic acids. Thermal analysis by TGA showed that C-PIM has two degradation stages where the first stage was decarboxylation and second stage was backbone decomposition. For the first time, the decarboxylation product was confirmed by TGA-MS, in which a loss of m/z 44 amu (CO2) at the first degradation stage was found. TGA also showed that the thermal stability of C-PIM was less than In our approach, another side reaction is the aromatic ring nitration. In the early discussion of the reaction solvent choice, aromatic nitration was observed for the reactions conducted in both THF and EtOAc. Aromatic nitration is caused by the nitronium ion (NO 2 + ) in the reaction system.
A typical example of nitration of polystyrene is reported by Philippides et al. where they used nitric acid and sulfuric acid mixture [45]. In the nitrous acid reaction, it seems that nitric acid (HNO 3 ) was also inevitably produced, which in turn resulted in the formation of NO 2 + .

Conclusions
A novel and effective method to convert PIM-1 to C-PIM was studied. The C-PIM was successfully prepared from PIM-CONH 2 using nitrous acid as a key reagent. The optimum reaction conditions were NaNO 2 , H 2 SO 4 in MeCN at 90 • C for 6 h. The resulting C-PIM was soluble in various organic solvents such as THF, acetone, DMSO and NMP. The chemical structure of C-PIM was characterised by 1 H NMR, 13 C NMR, FTIR, elemental analysis, UV-Vis, TGA and TGA-MS. These measurements confirmed complete conversion of the amide groups to carboxylic acids. Thermal analysis by TGA showed that C-PIM has two degradation stages where the first stage was decarboxylation and second stage was backbone decomposition. For the first time, the decarboxylation product was confirmed by TGA-MS, in which a loss of m/z 44 amu (CO 2 ) at the first degradation stage was found. TGA also showed that the thermal stability of C-PIM was less than PIM-CONH 2 under both N 2 and air atmosphere. GPC analysis showed continuous molecular weight degradation of C-PIM with extended reaction times. Aromatic nitration was observed as a side-reaction in EtOAc and THF. Further optimisation of this reaction is currently underway.