## 1 Introduction  
Industrialization and population growth have led to significant amounts of wastewater being generated worldwide [1, 2]. The textile industry is one of the major contributors to water pollution, followed by sectors such as dyeing, paper, leather, and printing. The release of dye waste into the environment can harm aquatic life and have adverse effects on human health [3]. Wastewater can cause esthetic and ecological problems, such as changes in water color, the formation of unpleasant odors, decreased light penetration, and reduced oxygen levels. These issues pose a threat to the survival of aquatic organisms. Individuals who come into contact with polluted water may experience skin disorders, and the consumption of contaminated water can lead to digestive problems. Consequently, these issues may contribute to health problems that could increase the risk of cancer over time [4, 5].  
Various methods can be employed for the treatment of dye wastewater. These methods include adsorption, flocculation, ion exchange, advanced oxidation processes, chemical precipitation, decantation, and biological degradation [6]. Among these techniques, adsorption stands out as a promising alternative due to its effectiveness, low cost, and the ease with which it can be processed depending on the specific characteristics of the system [7]. In this context, adsorption is regarded as a notable method because of its straightforward application, cost-effectiveness, and high efficiency tailored to the system's attributes [8,9].  
Biochar is gaining popularity as a low-cost adsorbent for wastewater treatment due to its large specific surface area and porous structure [10]. However, the recovery of biochar powder from wastewater is a complex process, often requiring centrifugation, which complicates its large-scale application [11]. The incorporation of magnetic Fe\({}_{3}\)O\({}_{4}\) into biochar facilitates the easy recovery of magnetic adsorbents from suspension using an applied magnetic field [12]. Additionally, the combination of oxygen-containing functional groups (-OH and -COO\({}^{-}\)) from sodium alginate with modified biochar prevents the agglomeration of magnetic carbon black nanoparticles and provides more active sites for the adsorption of methylene blue [13].  
Box-Behnken designs (BBDs) hold a significant position in the field of experimental design. These designs provide maximum information with the minimum number of trials needed to investigate the effects of experimental variables. Typically, BBD operates at three levels (\(-\)1, 0, 1) and can be utilized with a number of factors ranging between three and twenty-one. In this design, both numerical and categorical factors can be incorporated; however, the introduction of categorical factors may lead to an increase in the number of trials required. While central composite designs (CCDs) offer higher resolution, making them increasingly demanded in fields like pharmaceutical product development and process optimization, the efficiency of BBDs, which allow for fewer experiments, presents significant advantages in pharmaceutical research [14, 15, 16].  
The fundamental differences in this study from the literature are the use of pomergnate peel as active biochar and the combination of this biochar with magnetite and alginate beads to enhance the adsorption efficiency for methylene blue. Additionally, the use of Box-Behnken design allows for a systematic optimization of different parameters, providing a more detailed analysis compared to previous studies.