What happens to the average kinetic energy of water molecules as water freezes?