Organisms in an ecosystem play one of three roles: producer, consumer, or decomposer. Producers such as plants make their own food, consumers such as herbivores, carnivores, omnivores, and scavengers obtain energy by eating other organisms or dead matter, and decomposers such as bacteria and fungi break down waste and dead organisms. Energy flows through food chains and food webs with producers containing the most energy and higher levels containing less energy. Food webs better represent ecosystems as most organisms are involved in multiple overlapping food chains.