Entropy change during phase transitions