The first snails were limpet like molluscs who lived in shallow water.They fed on algae and their digestive tract ended at the back end of the body. The mantle cavity had a pair of gills for breathing.During the evolution of snails two important things happend: One is a process called torsion,most of the internal organs were twisted 180 degrees anticlockwise.This meant that the mantle cavity,gills and anus were situated in front of the animal now. This allowed for more room in the shell and the head could be withdrawn first.The other change was that the shell became more conical and then spirally coiled. The most primitive pulmonates are the Ellobiidae,with genera like Ovatella,Leucophytia and Carychium.The Ellobiidae live in salt marshes and coastal mud-areas.Muddy waters often lack oxygen,so breathing with a lung coming to the surface was probably easier than breathing by a gill. There are only three land genera in the Ellobiidae: Pythia,living in tropical forests along the coast of Australia and Malaya;Carychium and Zospeum. A lot of land molluscs have early ties with estuarine- or freshwaterspecies,and can share the same adaptations. Living in fresh water may lead to preadaptations which makes the route to land life easier than by a direct route from marine conditions.In other words:a limited supply of oxygen can lead to aerial breathing. Tropical Prosobranchs living in stagnant inland water(Pila,Pomacea)have a mantle cavity which has a gill and a lung. Aerial breathing in aquatic snails allows them to aestivate in dry periods.Further adaptations against drying out take place,and a different method of excretion.This finally leads to a life on land. A big group of prosobranchs living on the land and in fresh water are the Neritoidea. The genus Nerita lives on tropical shores.Theodoxus(Neritina) lives in slowly running water.Neritodryas living in the East Indies is almost a land prosobranch. Neritodryas dubias Theodoxus paullucciana The family Helicinidae are terrestrial snails living in tropical forests. The Cyclophoroidea have evolved from the Archaeotaenioglossa,just like the Ampullarioidea, which contains the amphibious Applesnails. From the Periwinkles( Littorinacea)the Pomatiasidae are evolved,as are the Valvatidae. They live in slowly running fresh water,and are unique in having a bipectinate ctenidium(gill). Pulmonate landsnails belong to the order of Stylommatophora(eyes on the top of tentacles),aquatic snails belong to the order of Basommatophora(eyes near the base).The Elobiidae are primitive snails from the latter.Both orders evolved from snails looking like ellobiids.But landsnails from the Endodontidae are known from the Carboniferous which is before the first ellobiid fossils appear. The earliest Stylommatophora are living in moist conditions,like the Succineidae. A lot of pulmonate snails can live in dry conditions,Helicella species can be found in full sun their shell sealed off.Hibernation, aestivation and survival of dehydration are features of the higher Stylommatophora.Slugs can lose 58 % of their own bodyweight in a day by loss of water. Terrestrial snails store calcium in the digestive gland which they use for shellbuilding. In most of the pulmonate groups there is an evolution towards complete loss of the shell. For example in the Zonitidae the shell gets thinner in the serie Zonitoides-Retinella-Oxychilus-Vitrea. And in the family Vitrinidae the shell is very thin and sometimes overgrown by the mantle. The slug family Limacidae has evolved from this family,and the Arionidae have evolved from endodontid pulmonates.