how to calculate ph adjustment