## 4 Conclusions  
The extrusion and roasting of potato starch with acids contained in the raw material derived from apple distillery wastewater allowed the production of starch esters substituted with malic acid residues. The degree of starch esterification was higher on average upon the use of higher roasting temperatures. The extrusion of starch followed by its roasting with apple distillery wastewater caused its darker color, its increased resistance to amylolytic enzymes, and its lower solubility compared to the starch roasted without the addition of wastewater. The changes observed in the modified starch preparations were significantly greater at roasting temperatures exceeding 100 \({}^{\circ}\)C. The thermal characteristics of extruded and roasted starch fell within a wide range of temperatures (42-76 \({}^{\circ}\)C), and their changes depended on both the extrusion and roasting temperatures. The heat of phase transition of the starch esters was lower compared the control samples (except for the preparation extruded and roasted at lower temperatures), with the greatest changes observed at the highest temperatures of extrusion and roasting. The viscosity of the pastes made of starch esters depended on the extrusion and roasting temperatures. The starch esters produced at the highest roasting temperature tested (regardless of extrusion temperature) formed less viscous pastes. At the lower roasting temperatures, apparent viscosity increased in the entire course of the flow curves of the pastes prepared from starch extruded at the higher temperatures (120 and 140 \({}^{\circ}\)C) and decreased in the case of those made from starch extruded at the lower temperatures (80 and 100 \({}^{\circ}\)C), except for the paste formed from the preparation extruded and roasted at a temperature of 100 \({}^{\circ}\)C. The process of the extrusion and roasting of starch with apple distillery wastewater, i.e., the process performed without a chemical agent, should be deemed an innovative method for resistant starch production.  
Conceptualization, T.Z.; methodology, A.J. and A.G.; software, A.G. and M.K.-Z.; validation, T.Z.; formal analysis, D.S. and B.R.; investigation, D.S., B.M. and M.K.-Z.; resources, D.A. and B.M.; data curation, A.G. and A.J.; writing--original draft preparation, T.Z. and J.B.; writing--review and editing, all authors; visualization, A.G. and D.A.; supervision, J.B. and D.S.; project administration, M.K.-Z. and A.J.; funding acquisition, B.R. All authors have read and agreed to the published version of the manuscript.  
The publication is co-financed under the Leading Research Groups support project from the subsidy increased for the period 2020-2025 in the amount of 2% of the subsidy referred to Art. 387 (3) of the Law of 20 July 2018 on Higher Education and Science, obtained in 2019. Thisresearch was funded by [PERSON] UNIVERSITY OF OSIJEK, under the research project Potential of application a distillery wastewater from the production of apple brandy for the production of naturally modified starches (UNIOS-ZUP 2018-26).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** Data is contained within the article.  
**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.