## 2 Materials and Methods
### Long-Term Removal of Nitrogen and Effects of Hydraulic Loading Rate  
Concentration of Tot-N showed frequent fluctuations and the average during the last 52 weeks of the experiment was \(38\pm 8\) mg L\({}^{-1}\), with maximum concentration 53 mg L\({}^{-1}\) and minimum concentration 18 mg L\({}^{-1}\). The average concentration of Tot-N in the effluent of the entire system, i.e., effluent from the HFF, was \(12\pm 6\) mg L\({}^{-1}\), with minimum concentration 2.8 mg/L and maximum concentration 23 mg L\({}^{-1}\) (Figure 3). The long-term removal of Tot-N in the entire system was \(71\pm 12\%\), with maximum removal 89.5% and minimum removal 47% (Figure 3). Overall, 60% of the samples analyzed during the last 52 weeks showed \(\geq\)70% removal of Tot-N and 44% of samples showed Tot-N removal \(\geq\) 80%. Most of the Tot-N removal was achieved by the HFF, with average removal of \(61\pm 14\%\).  
Figure 3: Scatter plots of (**A**) concentration of total nitrogen (Tot-N) in the influent (\(\blacktriangle\)) and effluent of the vertical flow filter (\(\blacktriangle\)) and horizontal flow filter (\(\blacktriangle\)), and (**B**) percentage removal of Tot-N in the vertical flow filter (\(\blacktriangle\)), horizontal flow filter (\(\blacktriangle\)) and entire system (vertical + horizontal filters; \(\blacktriangle\)) during 126 weeks of operation.  
Figure 2: Scatter plots of (**A**) concentration of chemical oxygen demand (COD) in the influent (\(\blacklozenge\)) and effluent of the vertical flow filter (\(\blacklozenge\)) and horizontal flow filter (\(\blacktriangle\)) during 126 weeks of operation, and (**B**) percentage removal of COD in the vertical flow filter (\(\blacklozenge\)), horizontal flow filter (\(\blacktriangle\)) and entire system (vertical + horizontal filters; \(\blacklozenge\)).  
The long-term removal of ammonium (NH\({}_{4}\)-N) was 93 \(\pm\) 2%, with almost all the removal occurring in the VFF. The concentration of NH\({}_{4}\)-N in effluent from the VFF and HFF was 4.5 \(\pm\) 4.3 mg L\({}^{-1}\) and \(<\)2.0 \(\pm\) 0.1 mg L\({}^{-1}\), respectively. Nitrification in the VFF and denitrification in the HFF showed increasing trends during the entire experimental period, including the last 52 weeks (Figure 4). The long-term average nitrification efficiency was 65 \(\pm\) 15%, with maximum efficiency 97%. The long-term denitrification efficiency was 49 \(\pm\) 14%, with maximum efficiency 98%. The effluent from the VFF and HFF showed periodic variations, represented by a decreasing trend in NO\({}_{3}\)-N concentration followed by an increasing trend (Figure 4). The average concentration of NO\({}_{3}\)-N in the effluent of the VFF and HFF was 29.3 \(\pm\) 7.5 and 10.7 \(\pm\) 6.0 mg L\({}^{-1}\), respectively.  
Increasing the HLR from 23 to 31 L m\({}^{-2}\) day\({}^{-1}\) increased the nitrification efficiency from 42 to 61% (Figure 5). When the HLR was increased from 31 to 39 L m\({}^{-2}\) day\({}^{-1}\), the denitrification efficiency decreased from 45 to 25% (Figure 5). The stepwise increase in HLR from 23 to 31 and then 39 L m\({}^{-2}\) day\({}^{-1}\) decreased the overall removal of Tot-N in the entire system from 81% to 71% to 59% (\(p<\) 0.05). With respect to the effects of OLR, regression analysis showed a significant direct relationship between OLR and removal of Tot-N in the entire VFF and HFF system (b = 0.35, R\({}^{2}\) = 0.105, \(p<\) 0.05; see Table S1 in Supplementary Information).