The pig is one of the oldest forms of livestock, having been domesticated as early as 5000 BC. It is believed to have been domesticated either in the Near East or in China from the wild boar. The adaptable nature and omnivorous diet of this creature allowed early humans to domesticate it much earlier than many other forms of livestock, such as cattle. Pigs were mostly used for food, but people also used their hides for shields and shoes, their bones for tools and weapons, and their bristles for brushes. Pigs have other roles within the human economy: their feeding behavior in searching for roots churns up the ground and makes it easier to plow; their sensitive noses lead them to truffles, an underground fungus highly valued by humans; and their omnivorous nature enables them to eat human rubbish, keeping settlements cleaner.