pH calculation in buffer solutions