explain how transferring energy into or out of a substance changes the molecules kinetic energy and changes their freedom of movement make sure to use the phrases gained or or loss