Dental microwear analysis is a method to infer diet and behavior in extinct animals, especially in fossil specimens. It has been used on a variety of taxa, including hominids, bears, horses, and elasmobranchs. Typically, the patterns of pits and scratches on the occlusal or buccal surface of the enamel are compared with patterns observed in extant species to infer ecological information. Hard foods in particular can lead to distinctive patterns (although see below). Microwear can also be used for inferring behavior, especially those related to the non-masticatory use of teeth as 'tools'. Other uses include investigating weaning in past populations. Methods used to collect data initially involved a microscope and manually collecting information on individual microwear features, but software to automatically collect data have improved markedly in recent years.