What are the three main functions of integumentary system?