Function of wastewater treatment plant