What is the main purpose of heat treatment