What happens to the chemical structure of water when it changes state?