Chlorine utilization during trihalomethane formation in the presence of ammonia and bromide