Stomata play an important role in photosynthesis as they allow the plant to absorb carbon dioxide from the environment. In exchange, stomata allow oxygen, which is a waste product of photosynthesis, to be released. In the process, water vapor is also lost as the internal parts of the leaves are exposed. To reduce exposure, stomata are found on the underside of the leaves. They are protected from the sun as excessive heat can increase the rate of water vapor leaving and thus wither the plant. Stomata also have guard cells around the epidermis that close when too much water is being lost.