optimizing water parameters