Fixed the pH formula, and added adjustment