what happens when metals undergo heat treatment