during a change in state energy is transferred in the form of