The skin plays an important role in regulating body temperature through homeostasis. The hypothalamus acts as the body's thermostat to maintain an optimal temperature range of 37 degrees Centigrade plus or minus 0.5 degrees through negative feedback loops. When the body gets too hot, the skin's blood vessels dilate and sweat glands become active to cool it down. When it gets too cold, the skin's blood vessels constrict and shivering occurs to generate heat and warm the body.