Sedimentary rocks are produced by the weathering and erosion of older rocks. In the earliest geological time these would have been the original igneous rocks, but subsequently other sedimentary and metamorphic rocks too will have been reworked. Weathering action by water, ice and wind breaks the rocks down into small fragments which are then carried by rivers and sorted into size and nature by further water action. Most deposits are laid down in the oceans as sedimentary beds of mud or sand, which build up in layers, become compressed and eventually are cemented together by minerals such as calcium carbonate (calcite), quartz (silica), iron oxide or dolomite (magnesium and calcium carbonate) remaining in the groundwater. The natural bedding planes associated with the formation of the deposits may be thick or thin but are potentially weak; this is used to advantage in the quarrying process. In masonry, to obtain maximum strength and durability, stones should be laid to their natural bed except for cornices, cills and string courses which should be edge-bedded. Face-bedded stones will tend to delaminate . When quarried, stones contain quarry sap and may be worked and carved more easily than after exposure to the atmosphere.