Assessment, modeling and optimization of parameters affecting the formation of disinfection by-products in water