ph optimization