Heat capacities and phase changes