COD and nitrogen compounds balance in mechanical-biological wastewater treatment plant with sludge treatment