|Directly behind the head is the thorax. It is an enlarged muscular portion of the body divided into three segments that bear six legs and four wings. The front pair of legs may be significantly smaller and modified in certain families. Each leg is jointed and contains five separate sections, the last of which is the tarsus or foot, which bears a tiny, hooked claw at the end. In addition to enabling the butterfly to securely grasp leaves, branches or other objects, the tarsi have sensory structures that are used to taste. Adult females scratch a leaf surface with their front tarsi to release the leaf's chemicals and taste whether they have found the correct host plant. Above the legs are two pairs of wings. Made up of two thin membranes supported by rigid veins, the generally large, colorful wings are covered with millions of tiny scales that overlap like shingles on a roof. The wings are used for a variety of critical functions, including flight, thermoregulation, sex recognition, camouflage, mimicry and predator deflection.