when a substance is heated energy is released/ absored. in chemisty this is called an