Evaluation of ammonia pretreatment of four fibrous biowastes and its effect on black soldier fly larvae rearing performance

Biowaste treatment with black soldier fly larvae (BSFL, Hermetia illucens L.) can promote a more sustainable food system by reusing nutrients that would otherwise be wasted. However, many agri-food wastes and byproducts are typically high in lignocellulosic fibers (i.e., cellulose, hemicellulose, and lignin), making it resistant to efficient larval and/or microbial degradation. Ammonia pretreatment could be used to partially degrade lignocellulose, making the biowaste more easily degradable by the larvae and/or microorganisms. This study evaluated ammonia pretreatment for lignocellulose degradation and its effect on BSFL performance on four fibrous bio-wastes: brewers spent grain, cow manure, oat pulp, and grass clippings. First, the optimal ammonia dose (1 % or 5 % dry mass) and pretreatment time (three or seven days) were assessed by measuring fibers after treatment and further examined using Fourier transform infrared spectroscopy (FTIR) spectra and scanning electron microscopy (SEM) images. Second, BSFL rearing performance on ammonia-pretreated substrates was assessed with a 9-day feeding experiment. Three-day pretreatment with 5 % ammonia was chosen as it decreased the total fiber content by 8 – 23 % for all substrates except cow manure. Contrary to expectations, ammonia pretreatment with all substates decreased BSFL rearing performance metrics by more than half compared to the untreated control. Follow-up experiments suggested that ammonia pretreatment had a dose-dependent toxicity to BSFL. Interest-ingly, three-day fermentation of cow manure and oat pulp increased bioconversion rate by 25 – 31 %. This study shows that ammonia pretreatment is not suitable before BSFL rearing. Ammonia toxicity to BSFL and other pretreatments, such as fermentation, should be further studied.


Introduction
Black soldier fly larvae (BSFL), Hermetia illucens L. (Diptera: Stratiomyidae), are an emerging biowaste treatment technology. BSFL can contribute to a more circular food system by upcycling nutrients that would otherwise be lost. BSFL can grow on a large variety of biowastes and agri-food byproducts, reducing mass/volume by 26-68% dry mass (DM) (Gold et al., 2018) and transforming the biowaste into a nutritious insect biomass that can be processed into high-protein meals as a (partial) replacement for soybean and fishmeal in animal diets (e.g., poultry, pigs, fish, pets) ( Barragan-Fonseca et al., 2017;Mohan et al., 2022). In addition to the insect biomass, a compost-like nutrient-rich residue remains, which can be composted and used for soil fertilization (Klammsteiner et al., 2020). Additional applications for BSFL endproducts include oils for biodiesel  and chitin for pharmaceuticals and technical applications (Vilcinskas, 2013).
Although BSFL can develop on many different biowastes, a current obstacle for the inclusion of low value biowastes into efficient BSFL treatment operations is their poor performance (e.g., longer treatment times, lower waste reduction and larval yields). For example, the BSFL bioconversion rate (i.e., unit of larvae produced per unit of waste) with animal manures is only 2-6 % DM (Liu et al., 2018;Rehman et al., 2017) in comparison to 13-21 % DM with highly nutritious food waste Nyakeri et al., 2017). This poor performance can also influence the potential environmental benefits (Smetana et al., 2016) and economic viability of the entire BSFL treatment system.
One reason for the low rearing performance can be the presence of difficult to digest lignocellulosic fibers (i.e., lignin, cellulose, and hemicellulose) in the biowaste. For example, Liu et al. (2018) found a negative correlation between larval weight and biowaste lignin content. Lignocellulosic fibers are notoriously difficult to digest because of their structure. Lignocellulose is composed of cellulose fibrils bundled together in a complex matrix, tightly bound by lignin and hemicellulose (Pérez et al., 2002). Lignin acts as a physical barrier creating difficulties for decomposition by larvae and/or microorganisms abundant in the biowaste/residue and larval digestive tract (Hu and Ragauskas, 2012). High contents of lignocellulose are common in biowastes, such as animal manures, agri-food byproducts and municipal organic solid wastes (Gold et al., 2018;Peguero et al., 2022). A reason for the decrease in BSFL treatment performance with lignocellulosic biowastes is likely the reduced availability of digestible nutrients (e.g., protein and digestible carbohydrates).
Biowaste pretreatments are a possible solution to make fibrous biowastes more degradable by BSFL and associated microorganisms. Pretreatments typically aim to partially remove lignin and/or hemicellulose thereby freeing cellulose for breakdown into more digestible compounds, simple sugars and glucose (Spano et al., 1976). Pretreatments have been widely used over the last 20 years to increase the nutritional value of fibrous animal feeds for ruminants (e.g., forage for dairy/cattle), biogas and bioethanol yields, and composting efficiency. Various physical (e.g., mechanical, thermal, electromagnetic), biological (e.g., bacteria, fungi, enzymes), and chemical (e.g., alkalis, acids, ozone, and oxidizing agents) pretreatments exist (Peguero et al., 2022). Limited studies have started investigating chemical pretreatment to increase BSFL performance. Liu et al. (2021) observed that alkaline pretreatment increased larval weight by 47 %.
Alkaline pretreatment is the most common chemical pretreatment because of its effectiveness in lignin and hemicellulose degradation (Antonopoulou and Gavala, 2015), but its potential is yet largely unexplored for BSFL treatment (Peguero et al., 2022). Specifically, soaking in aqueous ammonia pretreatment has been reported to be highly selective towards lignin at moderate temperatures (Kim et al., 2010). Ammonia pretreatment alters the chemical composition by splitting the ether and ester bonds between lignin and hemicellulose in addition to splitting the C-O-C bonds in lignin (Kim et al., 2010) by process of ammonolysis (Shi et al., 2020). Furthermore, ammonia pretreatment increases biowaste nitrogen, changes the C:N ratio, and potentially provides additional nutrients for microorganisms, while inhibiting mold growth (Sarnklong et al., 2010). Parodi et al. (2021) also revealed that BSFL can use some ammonium-nitrogen to build up their body mass.
This study aimed to assess ammonia pretreatment before BSFL treatment and its effect on the biowaste lignocellulosic composition. It was hypothesized that ammonia pretreatment would degrade lignocellulosic fibers, thereby increasing BSFL rearing performance. The biowastes used were brewer's spent grain (spent grain), cow manure, and grass clippings. In addition, oat pulp was used as a BSFL rearing substrate for the first time, contributing to further knowledge on additional BSFL rearing substrates. This research works towards the efficient utilization of low value fibrous biowastes in BSFL treatment.

Source of biowastes and agri-food byproducts
Four different biowastes and agri-food byproducts were used: spent grain, cow manure, oat pulp, and grass clippings. The four substrates were chosen because of their varying lignocellulosic composition and high production amounts which could potentially be recycled by BSFL. Spent grain was obtained from the Brewdaz brewery (Zürich, Switzerland). Semi-solid fresh cow manure was obtained from a dairy farm (Dübendorf, Switzerland). Oat pulp was the slurry from separating the liquid from the insoluble fibers during oat milk production and was obtained from Soyana (Zürich, Switzerland). Grass clippings were lawnmower clippings from a domestic lawn (Bern, Switzerland). Following collection, substrates were portioned into plastic bags and stored at − 20 • C until further use.

Origin of black soldier fly larvae
Black soldier fly eggs were from the research colony at Eawag (Dübendorf, Switzerland) operated according to Dortmans et al. (2017). Neonates that hatched within 24 h were reared at 28 • C with relative humidity of 70 % on chicken feed (75 % moisture content, UFA 620, Switzerland) for 6-7 days until reaching a mean individual weight of 1-3 mg DM. The larvae were then separated, manually counted, and directly used for feeding experiments with different substrates and treatments (raw, control, and ammonia-pretreated).

Ammonia pretreatment
The first part of the experiments focused on identifying the doses and pretreatment times (storage duration) resulting in fiber decomposition. Prior to ammonia pretreatment, substrates were thawed at 4 • C. Pretreatment consisted of adding aqueous ammonia solution to reach different ammonia doses of 1 % or 5 % (v/w) (based on DM) to each substrate in glass containers. The calculations used for determining a dose of ammonia solution (concentration 25 %, Supelco, Switzerland) are included in the Supplementary Material. The substrate and ammonia were thoroughly mixed and covered with an airtight lid to avoid ammonia loss and stored at ambient temperature for three or seven days (see Supplementary Material). At the end of the pretreatment time, the substrate pH (826, Metrohm, Switzerland) was measured and neutralized with the addition of 95-97 % sulfuric acid (Sigma Aldrich, Switzerland). A control (without added ammonia) served alongside for the same storage durations as the ammonia-pretreated substrates (see Supplementary Material for an image of the setup). All pretreatments and controls were performed in triplicate. Following pretreatment, substrates were analyzed for fiber content, as described below.

Larval feeding experiments
Larval feeding experiments were conducted with the pretreatment dose and time, resulting in reduction of the mean total fiber content (i.e., neutral detergent fiber), which was 5 % ammonia for three days for all substrates. Pretreated substrates were fed to BSFL for nine days at a feeding rate of 35 mg DM/larvae/day and a larval density of 2.5 larvae/ cm 2 with four replicates per treatment (Gold et al., 2020a). Treatments for larval feeding experiments were: raw (no added ammonia), control (no added ammonia, but stored for three days), and ammonia pretreatment (5 % for three days). The substrate was brought to 28 • C prior to adding larvae and 110 randomly selected and manually counted larvae were added to plastic containers (7.5 cm diameter, 11 cm height) and placed in a controlled climate chamber (HPP 260 Eco, Memmert GmbH, Germany). During the feeding experiment, the temperature and relative humidity in the climate chamber were 28 • C and 70 % for all substrates except for cow manure, which was 28 • C and 44-70 %. At the end of the experiment, the larvae were manually harvested from the residues, counted, and weighed. After determining the fresh weight, larvae were inactivated at 105 • C for 5 min and then dried at 60 • C for two days (Rehman, et al., 2017). Residues were dried in a laboratory oven at 60 • C until weight remained constant. Both the dried larvae and the residues were then weighed and stored at 4 • C for further analyses. Using larval numbers and residue and larval dry weights, common rearing performance metrics, including survival rate, larval weight at harvest, bioconversion rate, and waste reduction were calculated according to Gold et al. (2020a).

Substrate and residue physicochemical analyses
Moisture content of the substrate was determined as the weight loss of three grams of wet sample after overnight oven drying at 105 • C. Organic matter was calculated by subtracting the ash content from the total dried sample (100 %). Ash content was determined as weight loss of three grams of dried sample after three hours in a muffle furnace (Nabertherm GmbH, Germany) at 550 • C. Prior to analyzing fiber content, carbon, and nitrogen, substrates and residues were dried at 60 • C until weight remained constant and milled to 1 mm (10,000 rpm, Retsch ZM 200, Germany). Fiber analyses included neutral detergent fiber (Van Soest et al., 1991), and acid detergent fiber (AOAC, 1977). The raw substrate was also analyzed for acid detergent lignin (AOAC, 1977). Neutral and acid detergent fiber were analyzed with a Fibertherm® FT12 (Gerhardt Analytical Systems, Germany) using 0.5 g of dried sample. Following acid detergent fiber, the remaining dried residue was soaked in 72 % H 2 SO 4 for three hours for acid detergent lignin determination. Equations (1)-(5) were used to estimate the lignocellulosic composition:
Substrate protein content was estimated by multiplying nitrogen results with substrate-specific conversion factors: 6.25 for spent grain (Rommi et al., 2018), 4.3 for cow manure (Chen et al., 2017), 5.4 for oat pulp (based on results for cereals) (Mariotti et al., 2008) and 4.6 for grass clippings (Hoover et al., 2019). All physicochemical analyses were conducted with three to four replicates.
Fourier-transform infrared spectroscopy (FTIR) was conducted in triplicate to evaluate the chemical compositional changes before and after ammonia pretreatment using approximately two milligrams of dried sample. Spectra were recorded on a Bio-Rad FTS 575C equipped with a nine-reflection diamond disk of four-millimeter diameter (SensIR Technologies, United States). Scans were collected from 4000 to 400 cm − 1 at 2 cm − 1 resolution versus the appropriate background spectrum.
Scanning electron microscopy (SEM) was used to qualitatively evaluate changes in the surface morphology by comparing ammoniapretreated substrates to raw and control substrates. Dried samples were metal coated with 5 nm of platinum/palladium in a metal sputter during planetary rotation. The samples were imaged at 2 kV by secondary electron detention using a SEM (SU5000, Hitachi, Germany), except spent grain which was imaged at 3 kV using a SEM (7000F, JEOL, Germany).

Ammonia pretreatment effect on microbial numbers
Total aerobic viable counts (TVC) were estimated for all substrates (control and 5 %) to evaluate the effect of ammonia pretreatment on microbial populations present in the substrate. TVC were estimated using plate counts from a dilution series. Five grams of sample were transferred to a sterile stomacher bag with 45 mL of sterile maximum recovery diluent (0.85 % (w/v) NaCl, 0.1 % (w/v) peptone; Sigma Aldrich) and homogenized with a stomacher for 2 min (Gold et al., 2020b). TVC were determined in duplicate per biological replicate (n = 3-4) plating 0.1 mL of the dilution series on nutrient agar (1.5 % (w/v) Agar; VWR International, Belgium; 0.8 % (w/v) Nutrient Broth, Difco, Switzerland) and incubated at 30 • C for 48 h.

Ammonia treatment effect on black soldier fly larvae
To evaluate possible effects of ammonia treatment on larvae performance, substrate microorganisms were inactivated by autoclaving (121 • C for 15 mins; HG50, HMC Europe GmbH, Germany). Chicken feed (UFA 620, 70 % moisture content) was used as a model substrate. Sterilization was confirmed by measuring TVC. Ammonia solution was then added to obtain different ammonia doses (0 %, 1 %, 3 %, or 5 % based on DM) and immediately neutralized with sulfuric acid. To avoid re-introduction of microorganism, the containers were immediately covered. A larval feeding experiment was then conducted using the same experimental design and conditions as described above with four replicates for each ammonia dose.

Data analysis
FTIR data was analyzed and processed using Microsoft Excel (Version 2022, United States). All other data was analyzed using R statistical language (R Core Team, 2022, version 4.2.0). The mean, median, standard deviation, and range of the biowaste composition, BSFL performance metrics, and microbial counts were calculated. We abstained from statistical analyses due to the small sample size (n ≤ 4). The results were compared using mean and standard deviation (n = 3-4).

Characterization of raw biowastes and organic side-streams
Substrate nutrient and fiber composition can have a large influence on pretreatment and BSFL rearing performance metrics. In this study, the substrates varied in nutrient and fiber composition (Table 1, Fig. 1). Moisture contents were 74-75 %, within the optimal range (e.g., 70-80 %) for BSFL rearing (Dortmans et al., 2017). Cow manure was the exception, with 91 % moisture content.
Spent grain is a heterogenous substrate consisting of husk, pericarp and seed coat layer which are high in protein and fiber (Mussatto et al., 2006). Spent grain was among the most nutritious substrates in this study with a protein content of 25 % DM but high fiber content of 59 % DM. Liu et al. (2018) reported similar values of 23 % DM protein and 59 % DM fiber. The high protein and fiber content found in spent grain can be attributed to the removal of barley starch during the mashing process, concentrating insoluble nutrients (Mussatto et al., 2006). The lignin content of 8 % DM in this study was below the typical range of 12-28 % DM for spent grain (Fig. 1) (Forssell et al., 2008). Variation in the composition of spent grain can be expected because of many influencing factors, such as barley variety, harvest time, characteristics of the hops and mashing conditions (Forssell et al., 2008;Santos et al., 2003).
Cow manure was the least nutritious substrate, with a low protein content of 9 % DM and organic matter content of 82 % DM but a high fiber content of 52 % DM. These findings are consistent with values of 11 % DM protein, 81 % DM organic matter, and 58 % DM fiber previously reported by Gold et al. (2020a). Cow manure is typically characterized by a high fiber content because it mainly consists of undigested animal feed and bedding material such as straw (Cata Saady et al., 2021).
Oat pulp was among the most nutritious substrate and had the highest protein content of 36 % DM and lowest fiber content of 32 % DM. The low fiber content in the oat pulp could be explained by the use of hulled oats in the oat milk production process, which would remove the largest amount of fiber found in oats (Hsu et al., 1987).
Grass clippings was in the middle range in terms of its nutritional composition compared to the other substrates. The fibers were characterized by more cellulose than lignin and hemicellulose (Fig. 1). However, the composition of grass clippings can vary tremendously, depending on the grass type, season, and the inclusion of other materials (e.g., leaves and woody materials) (Bary et al., 2005).

Effect of ammonia pretreatment on substrates lignocellulosic composition
The change in substrate fiber composition is an important indicator for the effectiveness of a pretreatment. Fig. 2 shows the lignocellulosic composition (total fibers, sum of cellulose & lignin and hemicellulose) for each substrate before (control, 3d or 7d) and after ammonia pretreatment (1 % or 5 %, 3d or 7d).
The pretreatment effects were compared to the control, considering the mean value and standard deviation. Overall, the effect of ammonia pretreatment on the fiber composition was low and varied greatly among the substrates. For all substrates, 1 % ammonia pretreatment for three days did not have a relevant effect on the lignocellulosic composition and is therefore, not discussed further below. Additionally, 1 % ammonia pretreatment for seven-days for spent grain and oat pulp did not affect the lignocellulose composition.
With spent grain (Fig. 2a), 5 % ammonia pretreatment for three and seven days decreased the hemicellulose content, from 33.0 (1.6) (control, 3d) to 23.5 (2.6) % DM (5 %, 3d) and from 28.9 (1.7) (control, 7d) to 22.3 (1.8) % DM (5 %, 7d). Because of the similar hemicellulose reductions by ammonia pretreatment with the two pretreatment times, three days was chosen for the larval feeding experiments. Interestingly, the hemicellulose content in the seven-day control was lower than in the three-day control (29 % DM vs. 33 % DM). This may indicate that microbial decomposition occurred during the longer storage time.
With cow manure (Fig. 2b), the three-day pretreatment had little to no effect on the lignocellulosic composition. Jurado et al. (2013a,b) also did not observe an effect on the lignocellulosic composition after  (Gold et al., 2020a); c (Sterna et al., 2016); d (Bender et al., 1989). pretreatment of raw animal manure with ammonia solution using a much higher dose of 291 % DM for three days. Against our expectations, seven-day pretreatment increased the total fiber content, from 39.8 (1.9) (control, 7d) to 48.7 (2.8) (1 %, 7d) and 46.6 (1.5) % DM (5 %, 7d). This increase may be attributed to an increase in hemicellulose and cellulose & lignin contents (Fig. 2b). The fiber content decreasing from the raw substrate compared to the seven-day control (52.2 vs. 39.8 % DM) could indicate microbial decomposition was occurring. Therefore, the higher fiber content after seven-day ammonia pretreatment relative to the control is likely not due to an increase in total fibers but due to the suppression of microbial activity by the addition of ammonia solution. Ammonia can be toxic to microorganisms and suppress microbial biowaste degradation (Weihrauch et al., 2012). Although ammonia pretreatment for three days resulted in little to no fiber degradation, 5 % ammonia pretreatment for three days was chosen because of the higher fiber content observed with seven-day pretreatment compared with the control.
Ammonia pretreatment of oat pulp had little effect on the fiber composition (Fig. 2c). Three-day pretreatment with 5 % slightly decreased the total fiber content from 36.6 (2.3) (control, 3d) to 33.5 (1.0) % DM (5 %, 3d) but had no apparent effect on the hemicellulose content. Contrary to the three-day pretreatment, seven-day pretreatment did not influence the total fiber content. Interestingly, seven-day pretreatment decreased hemicellulose but increased the cellulose & lignin content (Fig. 2c). Due to the slight decrease in total fibers, 5 % pretreatment for three days was selected for the larval feeding experiments.
Seven-day ammonia pretreatment had no apparent effect on the fiber composition of the grass clippings. However, 5 % ammonia pretreatment for three days decreased hemicellulose from 22.5 (0.8) (control, 3d) to 12.8 (1.3) % DM (5 %, 3d). Cellulose & lignin also slightly decreased from 36.9 (0.6) (control, 3d) to 33.3 (2.4) % DM (5 %, 3d). Due to these decreases, 5 % pretreatment for three days was chosen for the larval feeding experiment.  Fig. 3. FTIR spectra of ammonia-pretreated substrates and their respective controls. Spectra displayed are the average of biological replicates (n = 3). The peaks identified are associated with functional groups corresponding to lignin, cellulose, and hemicellulose. 1740-1730 is associated with hemicellulose and lignin; 1526-1505 is associated with lignin, 1413 associated with cellulose; 1260-1240 corresponding to hemicellulose; 1157 related to cellulose and hemicellulose; and 1150-1030 associated with polysaccharides such as lignocellulose, see text for further explanation.

Fourier transform infrared spectroscopy (FTIR) of ammoniapretreated substrates
FTIR was performed to gain further qualitative insight into the chemical changes by 1 % and 5 % ammonia pretreatment with the most effective pretreatment time of three days. The FTIR spectra shown in Fig. 3 were visually analyzed within the fingerprint region of 1900-900 cm − 1 where the defined peaks are characteristic of functional groups associated with lignocellulose (Faix, 1991).
Ammonia pretreatment affected several peaks in the fingerprint region (Fig. 3). The peak between 1740 and 1730 cm − 1 is attributed to C = O acetyl group of hemicelluloses and ester bonds of the carboxyl group of lignin and/or hemicelluloses (El Ghali et al., 2012;Gao et al., 2020;Ravindran et al., 2018). The peak at 1526-1505 cm − 1 is associated with the C--C bonds in the aromatic ring of lignin (El Ghali et al., 2012;Fong Sim et al., 2012;Ravindran et al., 2018). The peak at 1413 cm − 1 corresponds to CH 2 and -CH 3 -, structures for the formation of cellulosic substrates (Orozco et al., 2014). The peak at 1260-1240 cm − 1 is associated with the C-O stretching of xylan (hemicellulose), and that at 1157 cm − 1 is characteristic of the asymmetric stretching vibration of C-O-C in cellulose and hemicellulose (Gao et al., 2020). Additionally, the region between 1150 cm − 1 and 1030 cm − 1 are typical for polysaccharides, such as lignocellulose (Carballo et al., 2008) and were identified on all the substrates and treatments.
Spectra of the 1 % ammonia-pretreated substrates were not visually different from the controls. This supports the fiber results where threeday 1 % ammonia pretreatment had little to no effect on the lignosellusoic composition. In contrast, 5 % pretreatment caused apparent changes to the chemical structure in regions characterisc of lignocelluloses. Ammonia pretreatment decreased the spectral peaks of spent grain (1740, 1526, 1240, and 1157 cm − 1 ) mainly associated with lignin and hemicellulose, oat pulp (1740, 1526, and 1157 cm − 1 ) related to lignin and hemicellulose, and grass clippings (1240 cm − 1 ) corresponding to hemicellulose. These results broadly confirmed the fiber results and provided additional information. Removal and/or reduction in peaks with spent grain, oat pulp, and grass clippings indicates hemicellulose reductions which were also found with the fiber results (Chaker et al., 2013). Additionally, the reduction of the peak at 1526 cm − 1 for spent grain and oat pulp suggests an interaction with lignin, which could indicate lignin reduction. Furthermore, FTIR spectral differences in regions characteristic of hemicellulose degradation were the largest for oat pulp, where fiber analyses only showed a small reduction in total fibers, but not hemicellulose. This suggests that ammonia pretreatment also affected the chemical structure of the lignocellulosic fibers not captured in the fiber analyses, potentially making them more degradable for BSFL. All ammonia-pretreated substrates, except grass clippings, showed a peak at 1415 cm − 1 . These findings indicate an increase in the amount of the functional group associated with cellulose.

Scanning electron microscopy (SEM) images
Physical changes of the substrate by the most effective ammonia pretreatment (5 %, 3d) compared to the control were assessed visually by SEM (Fig. 4). Representative SEM images were similar between the raw and control substrates; therefore, only the raw substrate is displayed here (see the control SEM images in the Supplementary Material). Ammonia pretreatment had a large influence on the surface structure of all the substrates. Before ammonia pretreatment, all raw substrates had an apparently smooth surface that could create difficulties for larval and/or microbial decomposition of the substrate. Spent grain (Fig. 4a), specifically, had several, presumably, decay-resistant silica bodies called phytoliths, on the surface. Phytoliths are known to serve as a protection for the fibers from degradation (Kim et al., 2008). Ammonia pretreatment for all substrates visibly ruptured the surface and exposed pores, potentially facilitating fiber decomposition (Kim et al., 2008). This included cow manure (Fig. 4c), where fiber and FTIR spectral analyses did not suggest changes in the lignocellulosic composition. These images suggest that three-day 5 % ammonia pretreatment altered the biomass structure, potentially improving the ability for larval and microbial degradation of the substrates in BSFL rearing.

BSFL rearing performance with and without pretreatment
Larvae developed on all substrates and treatments (raw, control and ammonia-pretreated) with survival rates ≥ 91 % (Table 2). Only ammonia-pretreated grass clippings had a lower survival rate of 87 %. These findings are similar to the survival rates of 90-99 % on various substrates previously reported by Gold et al. (2020a).
To the best of our knowledge, this is the first time that oat pulp was used as a BSFL rearing substrate. Among the untreated substrates (i.e., raw and control), oat pulp had the best rearing performance, whereas both cow manure and grass clippings performed the worst. Oat pulp had the highest larval weight, bioconversion rate, and waste reduction of all substrates. The bioconversion rates were 15.0 % DM (raw) and 18.8 % DM (control), similar to 15-22 % DM reported for food waste, abattoir waste, and human feces (Banks et al., 2014;Gold et al., 2020a;Lalander et al., 2019). More than half of the oat pulp was reduced and the larval weight was between 51 and 63 mg DM, which is comparable to 57 mg DM for BSFL reared on poultry feed, a typical high performance benchmark (Gold, et al., 2020a). The rearing performance metrics of untreated spent grain were similar to those found in previous studies. For example, the bioconversion rate with spent grain was 10 % DM (control) and 11.5 % DM (raw) in comparison to 9-14 % DM reported by Beesigamukama et al. (2021). Both cow manure and grass clippings had the lowest larval weights and bioconversion rates. The bioconversion rates for cow manure were 3 % DM (raw) and 4 % DM (control). The poor performance with cow manure was expected because of its low nutrient and high fiber content (Table 1, Fig. 1) and was similar to the 2-6 % DM bioconversion rates previously reported by other authors (Gold et al., 2020a;Miranda et al., 2019;Rehman et al., 2017). Although grass clippings had low bioconversion rates of 3 % DM (raw) and 4 % DM (control), it was reduced by approximately 30 % DM. Additionally, in a preliminary study with seven-day storage, BSFL reduced untreated grass clippings by 45-65 % DM and bioconversion rates were 7-8 % DM (see Supplementary Material). Given that grass clippings is abundantly available and is a main component of municipal organic solid waste that is often poorly managed, grass clippings should be further explored as a rearing substrate in future research (Danial et al., 2020).
Overall, BSFL performance between the raw and control was similar for all substrates. Interestingly, three-day storage without the addition of ammonia improved the larval rearing performance for cow manure and oat pulp. For example, the larval weight increased by 20-24 %, and bioconversion increased by 25-31 % for cow manure and oat pulp. This could be due to fermentation occurring during storage, increasing microbial degradation of the substrates, and providing accessible nutrients to the larvae. Previous studies have also reported positive effects of fermentation with and without microbial inoculants (Van Campenhout, 2021). For example, Mohd-Noor et al. (2017) found that four-week fermentation of coconut endosperm increased larval mass by approximately 79 % and Wong et al. (2020) found that 14-day fermentation of coconut endosperm with the addition of bacteria increased larval mass by approximately 41 % in comparison to an unfermented control. Our results for cow manure and oat pulp suggests that fermentation without added inoculum can increase rearing process performance with only three days of storage. Research should investigate the change in microbial composition during fermentation and how this may play a role in increasing larval bioconversion of substrates. The microbial composition was not assessed in this study, but a shift in the microbial community during storage may have occurred, resulting in a microbial composition more suitable for facilitating larval decomposition of cow manure and oat pulp.
Contrary to our expectations based on the fiber analyses, FTIR and SEM results, BSFL performance was the lowest in all estimated performance metrics for all ammonia-pretreated substrates (Table 2). For example, bioconversion rate decreased by 57-84 % with ammoniapretreated substrates compared to the control. Waste reduction and larval weight were 53-63 % and 22-67 % lower, respectively, to those of the control. This means that ammonia pretreatment with the dose and time tested in this study is not a viable pretreatment option. The reasons for this performance decrease could be two-fold: Firstly, BSFL rearing is strongly influenced by the substrate and frass microbial community. The added ammonia nitrogen could have shifted the C:N ratio to a less favorable ratio for the substrate microbial community, decreasing the microbial numbers needed for proper BSFL development. For example, Gold et al. (2020b) found that inactivating the substrate microbial community within canteen waste decreases bioconversion rate by 31 %. Secondly, the added ammonia could have been directly toxic or created an environment toxic to BSFL and their intestinal microbial community.
To inform future research direction for waste treatment with BSFL following ammonia pretreatment, these two reasons were investigated in follow-up experiments.

Ammonia toxicity to microorganisms and larvae
To evaluate the toxicity of ammonia to microorganisms, chicken feed was pretreated with 5 % ammonia for three days, and microbial numbers were determined. Ammonia pretreatment reduced the microbial numbers on all substrates and the C:N ratio (Table 3). Microbial numbers decreased by around 3 to 4 log 10 cfu/g substrate (Table 3), indicating that ammonia had an inhibitory effect on the substrate microbial community. This inhibition could be due to the specific storage conditions or the elevated ammonium concentrations (NH₄ + -N) of 6-18 mg/g substrate in ammonia-pretreated substrates. However, these ammonia levels are much lower than 2,000-25,000 mg/l proposed to be toxic in anaerobic digestion (Yenigün and Demirel, 2013). It is difficult to conclude how the decrease in the C:N ratio by ammonia pretreatment contributed to the poor larval performance. The C:N ratios in the ammonia-pretreated substrates ranged from 6 to 13 (Table 3). Lu et al. (2021) observed a 26 % decrease in larval yield when altering the C:N ratio from 18 to 10 with food waste. However, adjusting the C:N ratio can also have beneficial effects on BSFL performance. Palma et al. (2019) found decreasing the C:N ratio from 49 to 16 in almond hulls increased larval weight by 42 %, suggesting that the supplementation of nitrogen has a positive effect on larval performance.
A toxicity test on chicken feed was then performed to evaluate whether ammonia treatment (0, 1, 3, or 5 %, 0 days storage) had a direct detrimental effect on the larvae. Sterilized chicken feed was used to evaluate the potential effects to the larvae without influence from the substrate microbial community. Ammonia treatment caused a small decrease in survival rates from 98.9 (1.1) on control to 89.7 (4.1) % for 5 %.
BSFL rearing performance was inversely proportional to the ammonia dose (Fig. 5). The bioconversion rate was 25.1 (2.4) % DM typical for chicken feed (Gold et al., 2020a) and decreased by 18 % with 1 % and 96 % with 5 % ammonia pretreatment. These results indicate that the ammonia pretreatment had a direct adverse effect on the larvae and was probably the main reason for the decrease in rearing performance observed in the previous experiment with the four biowastes and not because of the reduced microbial numbers or shift in the C:N ratio. The dose-dependent detrimental effect on the larvae and/or associated microorganisms could be a result of a secondary effect generated by ammonium salts produced during the pH neutralization between ammonia and sulfuric acid. For example, ammonium sulfate can enhance the osmotic stress of the substrate, reduce microbial numbers (Müller et al., 2006) and/or cause metabolic stress on the larvae, influencing larval development (Belloni et al., 2018;Weihrauch et al., 2012). Lu et al. (2021) found similar results with BSFL, where addition of ammonium chloride (NH₄Cl) (1 g of nitrogen/100 g food waste DM) decreased the larval yield by 52 % compared to the control. The authors attributed this performance decrease to the toxicity of the ammonium chloride salt to BSFL. Ammonium salts can be toxic to BSFL by compromising lysosomal proteases that are involved in intracellular degradation of proteins (Weihrauch et al., 2012). Based on their ecological niche, BSFL can be expected to be tolerant to metabolic byproducts such as ammonia, similar to other Dipteran flies feeding on biowastes such as fruit flies (Drosophila) (Belloni et al., 2018). However, ammonia could be especially toxic to young larvae. Mature BSFL thrive in frass with ammonia concentrations in the order of 5-9 mg/g (Fuhrmann et al., 2022;Visvini et al., 2022), similar to 6-18 mg/g in the four ammonia-pretreated substrates (Table 3). Belloni et al. (2018) found that a high concentration of ammonium chloride (13.3 g/L) led to 100 % mortality of Drosophila suzukii larvae soon after hatching. The authors attribute this to the larvae's inability to identify ammonia as a toxin and react to the exposure, compromising the larvae's ability to metabolize ammonia and resulting in acute intoxication. This could imply that when young BSFL may be exposed to increased ammonia concentrations, their larval feeding and development time are decreased as they adapt to ammonia exposure. These results suggest that future research should study substrate/frass ammonia concentrations across the entire rearing cycle, and the toxicity of ammonia to all BSFL life stages.

Conclusions
The present study is the first study to systematically assess whether ammonia pretreatment reduces the lignocellulosic composition in biowastes and improves the BSFL rearing performance on fibrous biowastes. Fiber analyses, FTIR spectra, and SEM images revealed that Table 2 BSFL rearing performance metrics on the four substrates and treatments (raw, control and ammonia-pretreated) (n = 3-4). Waste reduction with cow manure was not estimated. In parentheses: standard deviation. Table 3 Microbial counts, ammonium concentration and C:N ratio in the substrates: control and ammonia-pretreated at 5 % for three days (n = 3-4).

Substrates Treatment Condition
Total viable counts Ammonium (NH₄ + -N) C:N ratio log 10 cfu/g mg/g ammonia pretreatment altered the lignocellulosic composition with the potential for increased larval and microbial decomposition. However, BSFL feeding experiments showed that ammonia pretreatment was not a suitable biowaste pretreatment. BSFL rearing performance metrics were at least halved on all substrates, likely due to the toxicity of ammonia/ ammonium and/or their salts to the larvae or associated microorganisms. Future research should explore the toxicity of ammonia at different life stages of BSFL, as older larvae may be less susceptible to ammonia and could therefore allow a second and third feeding of ammoniapretreated substrates. In addition, other alkaline (e.g., sodium hydroxide), physical, and microbial pretreatments resulting in lignocellulosic degradation should be explored as they may be more suitable for improving BSFL development. Short storage/fermentation periods of less than seven days should be explored, since this was shown to improve larval performance on cow manure and oat pulp. For any pretreatment, a life cycle and life cycle cost assessment should be conducted to evaluate its effect on the environmental and economic aspects of the BSFL production system.

Data Availability Statement
All original data supporting the findings of this study are publicly available. Raw data and custom R scripts developed for the analyses and visualizations can be found at: https://github.com/dapeguero/a mmonia-pretreatment.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.