crude oils can contain organic acids that are mainly comprised of naphthenic acids that contribute to corrosion of refinery equipment at elevated temperature . the present invention discloses that when organic acids , such as naphthenic acids , found in crude oil or bitumen are treated with enzymes , in particular lipase enzyme , in combination with ammonia hydroxide or other amines , they can be converted into naphthenic acids derived amides that do not possess corrosive properties . the process is accomplished by dissolving the naphthenic acid containing crude oil or bitumen in diluent ( organic solvent ). to the naphthenic acid solution were added ammonium hydroxide and / or other amines , such as ammonium carbamate or dodecylamine , and lipase enzyme resin . the mixture was then incubated at 40 ° c .- 60 ° c . in a reactor with mixing . the resulting naphthenic acid derived amides found in the diluted crude oil or bitumen can then be processed normally in a refinery using such processes as cracking or hydrotreating and converted to hydrocarbon , ammonia and carbon dioxide without causing damage to the refinery infrastructure . in a preferred embodiment of the invention , a lipase enzyme that is capable of synthesizing amides from carboxylic acids is used . for example , the lipase b enzyme from candida antarctica is a thermostable enzyme that can complete this biochemical conversion at temperatures of 40 - 60 ° c . enzyme optimization studies using model naphthenic acid compounds and lipase b were performed to maximize the conversion of the acid substrates . experiments were conducted by increasing the concentrations of the amine acceptor substrate ( ammonium carbamate , hexylamine and dodecylamine ) to maximize the conversion . the applicant has found that the optimal ratio of the amine acceptor substrate was between 1 to 1 . 1 and 1 to 1 . 4 . the lipase b enzyme was further tested at 60 ° c . to determine if enhanced product conversion could be obtained at a temperature at which crude oil is held prior to being sent to an upgrader or refinery for processing . the results show that a dramatic improvement of conversion at 60 ° c . compared to the conversion at 40 ° c . the present invention may be demonstrated with reference to the following non - limiting examples . the naphthenic acids from crude oil samples were obtained by absorbing the acids onto ion exchange resin . one or ten gram samples of the oils were taken and dissolved in either 4 ml or 40 ml of toluene . each sample was done in duplicate and selected samples were repeated several times . to the diluted oil samples was added freshly prepared qae sephadex ™ a - 25 acid ion exchange resin to a concentration of 200 mg of resin / gram of crude oil . the resin was first prepared by washing the resin with 20 ml 1m na 2 co 3 / nahco 3 followed by deionized water ( 3 × 5 ml ) until the ph was approximately equal to 7 , and finally with 5 ml of methanol . after adding the ion exchange resin to the diluted crude oil sample , it was gently stirred for 18 h . the crude oil / resin mixture was then poured into a fritted glass filter and washed with three times with toluene ( 5 - 7 ml ) and then 2 : 1 toluene / methanol ( 3 × 5 ml ) to remove the unbound material . the naphthenic acid component was removed from the resin by adding 5 ml 1m formic acid and 10 ml 1 : 1 toluene / methanol . the resin and acid solution was stirred and allowed to equilibrate for 1 - 2 h prior to elution . the above process was repeated one more time using 3 ml 1m formic acid and 10 ml 1 : 1 toluene / methanol . the resin is mixed and allowed let stand for 1 h . it is then filtered by vacuum and washed until clear with 2 : 1 toluene / methanol as before . the solvent was then removed from the combined formic acid extracts under vacuum to yield the naphthenic acid extract . the extracts were then weighed and characterized by 1 h and 13 c nmr , infrared ( ir ) spectroscopy and high temperature simulated distillation boiling point ( bp ) analysis as well as elemental ( chnos ) analysis . the samples for 1 h nmr spectroscopy were prepared by mixing approximately 20 mg of the sample with 700 μl of deuterochloroform ( cdcl 3 ). the nmr spectroscopic analyses were performed at room temperature ( 20 ± 1 ° c .) on a varian inova ™ 600 mhz nmr spectrometer , operating at 599 . 7 mhz for proton . the proton spectra were collected with an acquisition time of 3 . 0 s , a sweep width of 20 , 000 hz , a pulse flip angle of 30 . 6 ° ( 3 . 3 μs ), and a 1 s recycle delay . these pulse recycle conditions permitted the collection of quantitative spectra for all protonated molecular species in the samples . the spectra , resulting used 0 . 3 - hz line broadening to improve the signal - to - noise ratio , were referenced to the residual chloroform resonance at 7 . 24 ppm . fourier transform infrared ( ftir ) samples were prepared by dissolving 50 mg quantities of acid - toluene or acid - white oil samples in 600 μl methylene chloride . spectra were collected using a thermo - nicolet ™ ftir spectrometer and a 0 . 1 mm kbr fixed cell . a total of 128 transients were collected . samples were analyzed on a hewlett packard ™ 6890 gas chromatograph with a 5973 series mass selective detector and a 30 - m hp rb - 5ms column . the initial gc temperature program used for analysis was 45 ° c . for 5 min followed by an increase of 8 ° c / min to 340 ° c . with a final hold time of 5 minutes . 1 . trial incubations of lipase b - acrylic acid , phenylbutyric acid and amine acceptor substrates fifteen mg ( 91 . 4 μmol ) of phenylbutyric acid was combined with 100 mg of c . antarctica lipase b - acrylic resin and amine substrates , ammonium hydroxide ( 6 μl , 108 μmol , dodecylamine ( 18 . 5 mg , 100 μmol ) or cyclopentylamine ( 6 μl , 8 . 5 mg , 100 . 6 μmol ) in 0 . 7 ml of toluene . the reaction was allowed to proceed with end - over - end mixing at room temperature for 4 h . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and the reaction mixture was carefully removed by pipette and then analyzed by gc - ms . 2 . trial incubations of lipase b - acrylic acid , ammonium hydroxide and carboxylic acid donor substrates fifteen mg of 4 - phenylbutyric acid ( 91 . 4 μmol ), 4 - cyclohexylbutyric acid ( 88 . 1 μmol ), trans - styrylacetic acid ( 92 . 5 μmol or indan - 2 - carboxylic acid ( 92 . 5 μmol ) were combined with 20 mg of lipase b - acrylic resin and amine substrate , ammonium hydroxide ( 10 μl , 180 μmol ) in 0 . 7 ml of toluene or heptane . the reaction was allowed to proceed with end - over - end mixing at room temperature for 18 h . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . 3 . time dependent incubation of 4 - cyclohexylbutyric acid and ammonium hydroxide with lipase b - acrylic acid fifty - one mg ( 299 . 6 μmol ) of 4 - cyclohexylbutyric acid was combined with 100 mg of lipase b - acrylic resin ( specific activity 10 , 000 u / g ) and amine substrate , ammonium hydroxide ( 6 μl , 8 . 5 mg , 100 . 6 μmol ) in 1 ml of toluene . the reaction was allowed to proceed with end - over - end mixing at 40 ° c . for 1 , 2 , 4 , 8 and 24 h . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . 4 . concentration dependent incubation of 4 - cyclohexylbutyric acid or 4 - phenylbutyric acid and ammonium hydroxide with various amounts of lipase b - acrylic acid fifty mg of either 4 - cyclohexylbutyric acid ( 293 . 7 μmol ) or 4 - phenylbutyric acid ( 304 . 9 μmol ) was combined with the amine substrate , ammonium hydroxide ( 6 μl , 8 . 5 mg , 100 . 6 μmol ) in 1 ml of toluene . various amounts ( 10 , 50 or 100 mg ) of lipase b - acrylic resin was added to the incubation mixtures and the reaction incubated with end - over - end mixing at 40 ° c . for 18 h . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . 5 . trial incubation of athabasca and asia 3 naphthenic acids with lipase b and amine substrate the naphthenic acids isolated from athabasca bitumen ( 50 mg ) was dissolved in 1 ml of toluene . to the naphthenic acid solution was added ammonium hydroxide ( 6 μl , 8 . 5 mg , 100 . 6 μmol ), ammonium carbamate ( 7 . 8 mg , 100 μmol ) or dodecylamine ( 18 . 5 mg , 100 μmol ) and 200 mg of lipase b - acrylic acid resin . after addition of the resin , the sample was then incubated overnight ( approximately 18 hours ) at 40 ° c . with end - over - end mixing . each sample was done in duplicate . freshly prepared qae sephadex ™ a - 25 acid ion exchange resin ( at a concentration of 200 mg of resin / gram ) was added to the lipase - reacted samples . the ion exchange resin was first prepared by washing the resin with 20 ml 1m na 2 co 3 / nahco 3 followed by deionized water ( 3 × 5 ml ) until the ph was approximately equal to 7 , and finally with 5 ml of methanol . after adding the ion exchange resin to the diluted crude oil sample , it was gently stirred for 18 h . the enzyme reaction mixture was then poured into a fritted glass filter and washed with three times with toluene ( 5 - 7 ml ) and then 2 : 1 toluene / methanol ( 3 × 5 ml ) to remove the unbound material . the material that was unbound to the resin was the lipase converted naphthenic acids . the naphthenic acid component was removed from the resin by adding 5 ml 1m formic acid and 10 ml 1 : 1 toluene / methanol . the resin and acid solution was stirred and allowed to equilibrate for 1 - 2 h prior to elution . the above process was repeated one more time using 3 ml 1m formic acid and 10 ml 1 : 1 toluene / methanol . the resin is mixed and allowed let stand for 1 h . it is then filtered by vacuum and washed until clear with 2 : 1 toluene / methanol as before . the solvent was then removed from the samples under vacuum to yield the naphthenic acid extract and the enzyme converted product . the samples were then weighed and the samples generated from the reaction with dodecylamine , characterized by 1 h nmr . d 2 o exchange experiments were done on the same samples by adding a drop of d 2 o to the nmr tube and re - recording the spectrum . another experiment was done using the asia 3 crude oil naphthenic acid sample was done as described above . approximately 100 mg of asia 3 naphthenic acids were dissolved in 4 ml of toluene . separately , 37 . 2 mg dodecylamine was added to another 4 ml of toluene . one milliliter aliquots of the acid and dodecylamine were added to reaction vials , two of which contained approximately 200 mg of the lipase b - acrylic resin . the two other control vials did not receive any enzyme resin . an additional 1 ml of toluene was added to each of the reaction vials to thoroughly mix the substrates and the enzyme resin , and then incubated overnight ( approximately 18 hours ) at 40 ° c . with end - over - end mixing . after reaction , the naphthenic acids were removed using ion exchange resin . the unbound material which represents the lipase generated products . the samples were then weighed and characterized by 1 hnmr . d 2 o exchange experiments were done on the same samples by adding a drop of d 2 o to the nmr tube and re - recording the spectrum . 1 . concentration dependent incubation of 4 - phenylbutyric acid and ammonium carbamate or dodecylamine with various amounts of lipase b - acrylic acid fifty mg ( 304 . 9 μmol ) of 4 - phenylbutyric acid was combined with the amine substrate , ammonium carbamate ( amounts ranging from 64 to 384 μmol ) or dodecylamine ( amounts ranging from 108 to 755 μmol ) in 3 ml of toluene . one hundred mg of lipase b - acrylic resin was added to the incubation mixtures and the reaction incubated with end - over - end mixing at 40 ° c . for 18 h . all samples were run in duplicate . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and 200 μl of the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . 2 . incubations of lipase b - acrylic acid , ammonium carbamate , hexylamine or dodecylamine and carboxylic acid donor substrates using optimized conditions fifty mg of 4 - phenylbutyric acid ( 304 . 9 μmol ), 4 - cyclohexylbutyric acid ( 293 . 7 μmol ), trans - styrylacetic acid ( 308 . 3 μmol ) or indan - 2 - carboxylic acid ( 308 . 3 μmol ) were combined with 100 mg of lipase b - acrylic resin and amine substrates , ammonium carbamate ( 30 mg , 384 μmol ), dodecylamine ( 80 mg , 432 μmol ) or hexylamine ( 50 μl , 38 mg , 491 μmol ) in 3 ml of toluene . the reaction was allowed to proceed with end - over - end mixing at 40 ° c . for 18 h . all samples were run in duplicate . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and 200 μl of the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . 3 . effect of temperature on product formation on the incubation of 4 - phenylbutyric acid and hexylamine with lipase b - acrylic acid fifty mg ( 304 . 9 μmol ) of 4 - phenylbutyric acid was combined with 100 mg of lipase b - acrylic resin and amine substrate , ammonium hydroxide ( 50 μl , 38 mg , 491 μmol ) in 1 ml of toluene . the reaction was allowed to proceed with end - over - end mixing at either 40 or 60 ° c . for 0 , 1 , 3 , 6 and 24 h . all samples were run in duplicate . after incubation , the immobilized enzyme was allowed to settle to the bottom of the vial , and 200 μl of the reaction mixtures were carefully removed by pipette and then analyzed by gc - ms . a 2 - ml coarse filtered fitted glass funnel was placed in a 25 - ml glass vial with a teflon lined silicone septum . 1 . 2 mm id teflon tubing was run from the bottom of the glass vial through the septum and a peristaltic pump and back through the septum into the fritted glass funnel . the fitted glass funnel was charged with 100 mg the lipase b - acrylic resin . the reaction components including the amine and carboxylic acid donor substrate or the naphthenic acid samples were dissolved ( suspended in 10 - ml of toluene and the liquid reaction mixture was placed in the glass vial that was fitted with a small stirring bar to ensure the reaction mixture was homogeneous throughout incubation . the reaction mixture was then circulated through the peristaltic pump and drip fed into the fitted glass funnel containing the lipase enzyme . the entire apparatus was incubated at a temperature of either 40 or 60 ° c . with the exception of the peristaltic pump and a minimal length of teflon tubing . using the bioreactor apparatus described above , the fitted glass funnel was charged with 100 mg of lipase b - acrylic acid resin . fifty milligrams of 4 - phenylbutyric acid and hexylamine ( 50 - μl , 38 mg , 491 μmol ) was dissolved in 10 - ml of toluene in the glass vial . the assembled bioreactor was incubated at 40 ° c . for 24 h . after incubation , the fitted glass funnel was allowed to drain and the reaction mixture was removed . a fresh reaction mixture containing 50 mg of 4 - phenylbutyric acid and 50 - μl of hexylamine dissolved in toluene was placed in the glass vial , and the incubation restarted without changing the lipase b - acrylic acid resin in the fitted glass funnel , and allowed to proceed for 24 h . this was repeated for 2 additional consecutive incubations , or 4 incubations in total . from each reaction mixtures , a 200 μl sample was removed by pipette and then analysed by gc - ms . 1 . use of the lipase b enzyme in a bioprocess to reduce the corrosive properties of oil this lipase b enzyme could be used to reduce the corrosive properties of crude oil and bitumen by converting the naphthenic acids in crude oil into a non - corrosive species ( naphthenic acid amides ) as shown in fig1 . the generated amides would then treated by conventional hydrotreating processes resulting in an improved product that is no longer corrosive . to determine whether the lipase b enzyme could function in a bioupgrading process , the immobilized enzyme ( onto acrylic acid ) was tested for the ability to bio - convert the model naphthenic acid compounds into amide products in combination with ammonium hydroxide in toluene . the results in fig2 and 3 demonstrate that the model naphthenic acid compounds can be converted into the desired amides as identified by gas chromatography - mass spectrometry ( gc - ms ) analysis . the results also indicate that the reaction proceeded cleanly with no side products being generated during the reaction . similar assays were also performed using heptane as the solvent for the enzyme reaction with the same results . the results in fig4 also demonstrate that the lipase b enzyme can convert the model naphthenic acid acyl donor substrates into product to the same extent confirming the broad substrate specificity for the enzyme . a complimentary set of experiments were done to assess the capability of the lipase b enzyme to transfer an acyl group from phenylbutyric acid to a panel of amine acceptor substrates including ammonium carbamate , ammomiun hydroxide , cyclopentylamine and dodecylamine . all four amines were substrates for the lipase b enzyme as shown in fig5 with a slight preference for the long chain alkyl amine , dodecylamine . in fig6 , the enzyme reaction was shown to proceed in a concentration dependent fashion when increased amounts of the immobilized lipase b enzyme were added to the reaction mixture containing either cyclohexyl - or phenylbutyric acid and ammonium hydroxide in toluene . in fig7 , the amount of product formed also increased in a time dependent manner in incubations with cyclohexylbutyric acid and ammonium hydroxide at 40 ° c . the enzyme results with the model naphthenic acid compounds are good predictors for the lipase b converting actual naphthenic acids found in crude oil . a series of experiments were done using the naphthenic acids isolated from athabasca and asia 3 crude oil samples . the athabasca naphthenic acid isolate were dissolved in toluene and incubated with lipase b using ammonium hydroxide , ammonium carbamate and / or dodecylamine as the substrate . after the incubation , the resulting naphthenic acid amide could be readily separated from the unreacted naphthenic acid starting material by adsorbing the acid onto ion exchange resin . when using the athabasca naphthenic acids as the donor substrate , 10 , 15 and 13 % of the starting material was converted into the product amide when using ammonium hydroxide , dodecylamine and ammonium carbamate as the donor amine substrate . a preliminary characterization of the product generated from the reaction of the athabasca naphthenic acids with dodecylamine was done using 1 h nmr . the results in fig8 show a significant change in the amide product ( bottom spectra ) when compared to the naphthenic acid starting material ( top spectra ). the broad signal centred around 10 . 8 ppm , which is characteristic of carboxylic acids , is completely absent in the product spectra . this signal is replaced in the anticipated amide product with a new set of signals at 5 . 4 ppm . the characteristic chemical shifts for amide protons are between 4 and 9 ppm . a complimentary set of experiments was done using the naphthenic acids isolated from asia 3 crude oil , dodecylamine and lipase b . after reaction with lipase , the product was isolated from the naphthenic acid starting material as before , weighed and then subjected to 1 h nmr analysis . the results indicated approximately a 50 % conversion of asia 3 naphthenic acids into product . the nmr spectra in fig9 again show a difference of the enzyme product ( lower spectra ) when compared with the starting material . the combined results of the naphthenic acids isolated from athabasca and asia 3 crude oil suggest that the lipase b enzyme can convert naphthenic acids into naphthenic acid amides . the spectra in fig8 and 9 show the presence of additional peaks in the regions of 4 to 9 . these peaks are suggestive of materials that originate from acrylic acid polymer support that is used to immobilize the lipase b enzyme . enzyme optimization studies were performed to maximize to conversion of the acid substrate into product . these experiments were done by increasing the concentrations of the amine acceptor substrate ( ammonium carbamate and dodecylamine ) to maximize the conversion of the donor substrate , phenylbutyric acid . the results in fig1 and 11 demonstrate that the optimal ratio of the acceptor substrate dodecylamine and ammonium carbamate was 1 to 1 . 4 and 1 to 1 . 3 respectively . using these ratios of substrates , more than half of the starting material was converted into product . these optimized conditions were then used to determine if enhanced conversion of a panel of acid donor substrates into product amines could be achieved . fig1 shows the results of the experiments where an additional amine substrate , hexylamine , was also added to the studies . as expected , this amine was a substrate for the lipase enzyme . the results show a significant increase in amide formation . generally a 5 to 11 - fold increase in substrate conversion was achieved when compared to the preliminary results shown in fig4 . as mentioned previously , c . antarctica lipase b has the ability to function at a wide variety of elevated temperatures . the lipase enzyme was tested at 60 ° c . to determine if enhanced product conversion could be obtained at a temperature at which crude oil is held prior to being sent to an upgrader or refinery for processing . the results in fig1 show that a dramatic improvement was observed in the conversion of hexylamine and phenylbutyric acid into product at 60 ° c . when compared to the conversion at 40 ° c . after 6 h of reaction , 63 % of the substrates were converted into product at 60 ° c . as compared to only 27 % at 40 ° c . after 24 h of incubation , 99 % of the substrates were converted to product at 60 ° c . compared to 64 % at 40 ° c . at this point , it was determined that characterization had proceeded sufficiently far to warrant an experimental setup which would more closely mimic a possible final application , and also provide better mixing of the reaction solution with the inert lipase b - acrylic resin beads . the new miniature bioreactor apparatus would need to be rapidly assembled and dismantled , and easily scalable from small volumes ( 5 - 10 ml ) to much larger volumes in the future , without changing the basic design . to this end , an apparatus was constructed to mimic a batch feed fixed bed reactor system , appropriately scaled to the volumes which were currently in use . a 2 ml fritted glass buchner funnel with a coarse filter was used to support the lipase and placed in a 25 ml glass vial with a teflon and silicone septum . 1 . 2 mm id teflon tubing was used in conjunction with a peristaltic pump to drip the reaction solution from the glass vial to the lipase in the fritted glass funnel , thus ensuring adequate exposure of the reaction mixture to the immobilized lipase b - acrylic acid resin . following the design and assembly of the bioreactor , the stability of the enzyme over time in the bioreactor was determined . literature reports indicated that lipase b was stable over time across multiple runs in other industrial applications . this experiment was performed to confirm the stability across several runs in the presence of organic acids in an organic system . further , this would confirm the feasibility of the bioreactor design for use in a bioupgrading process for converting naphthenic acids . the reactor was charged with lipase at the outset , and a freshly prepared reaction mixture of hexylamine and pba was used in 4 successive 24 h incubations . gc - ms analysis ( fig1 ) showed product formation was consistent with the performance observed in the previous apparatus , and the enzyme remained stable and productive over 4 consecutive 24 h runs .