Started to implement calculations based on PH.