In certain conditions, and over a very long period of time, sediment becomes compacted and cemented into sedimentary rock. Fossils are more common in some kinds of sedimentary rocks than others. There are many factors that can contribute to the likelihood of an organism being preserved as a fossil. Fossils are most common in limestones. That is because most limestones consist partly or mostly of the shells of organisms. Sometimes, however, the shells are worn so much that they look like sediment grains rather than "real" fossils. Fossils are also common in shales, which form from muds. Excellent imprint fossils can be formed in fine-grained sediments like muds. Only some shales contain fossils, however, because many areas of muddy ocean floor had conditions that were not suitable for animal life. In this case, only swimming or drifting organisms that die and fall into the mud have a chance to become fossilized. Although this does happen, it is a very rare occurrence. Some sandstones contain fossils as well. Most sandstones do not contain fossils, for various reasons. Water currents in the environment might have been too strong for animals to survive. Also, sands are very porous, so water seeping through the sand might have dissolved the shells away long before the sand was buried and changed into sandstone.