Just when you thought, what are cockroaches for? Well, thank goodness they were around back when the dinosaurs walked the earth, otherwise it would be covered with dino-shit.

According to this new research paper:
Dinosaurs undoubtedly produced huge quantities of excrements. But who cleaned up after them? Dung beetles and flies with rapid development were rare during most of the Mesozoic. Candidates for these duties are extinct cockroaches (Blattulidae), whose temporal range is associated with herbivorous dinosaurs. An opportunity to test this hypothesis arises from coprolites to some extent extruded from an immature cockroach [check out the image above—ed.] preserved in the amber of Lebanon, studied using synchrotron X-ray microtomography.

1.06% of their volume is filled by particles of wood with smooth edges, in which size distribution directly supports their external pre-digestion. Because fungal pre-processing can be excluded based on the presence of large particles (combined with small total amount of wood) and absence of damages on wood, the likely source of wood are herbivore feces. Smaller particles were broken down biochemically in the cockroach hind gut, which indicates that the recent lignin-decomposing termite and cockroach endosymbionts might have been transferred to the cockroach gut upon feeding on dinosaur feces.