process optimization phosphate treatment