The granular layer contains living cells that give rise to new epidermis /whose cell replace the cornfield layer.
The Malpighian layer secrets melanin; which protects the body against harmful ultra violet rays;
Sebaceous glands produce sebum; which keeps the skin soft/is water proof /is mildly antiseptic;
It has blood vessels /arterioles and capillaries; which dilate /vasodilation; to help blood lose heat at hot times; or constrict/vasoconstriction; to prevent heat loss when its cold.
It has erector –pili muscles which contracts when it is cold making hair to stand upright; trapped air helps to insulate the body against heat loss;
When it is hot, the erector –pili muscles relaxes and hairs lie flat; hence no air is trapped and excess heat is lost;
Sweat glands produce sweat; the sweat on the skin surface evaporate hence cooling the body;
The subcutaneous fat/adipose tissue; serves as an insulator to prevent heat loss when its cold;
Nerve endings and sensory receptors;
Perceive any changes around the body; hence detects any dangers