It's not easy being a dung beetle.

Besides the obvious fact that they eat, well, dung, the act of just getting a meal is an involved process.

In the most elaborate carry-out scenario, the dung beetles must first stake claim to their piece of poop at the main dung pile, then shape it into a sphere for easy transport, fend off other dung beetles trying to steal it, and then — using the stars to navigate — determine the fastest way to roll their prize away to a safe spot for consumption.

But now, researchers from Lund University in Sweden say one part of this process might not be as taxing for the dung beetles as previously thought: The celestial navigation.

In a study published in the scientific journal Current Biology, researchers say dung beetles take "snapshots" of the stars and store the images in their brains.

Instead of using the stars — specifically the Milky Way — as a map that the beetles intermittently reference for directions, the researchers say dung beetles take one snapshot of the constellation, which is sufficient for navigation.

One of the researchers, Basil el Jundi, explains in a press release that the snapshot method for orientation allows the beetles to be more efficient because they don't have to rely on long processes to retrieve information.

"We are the first to have shown that dung beetles are taking these snapshots. We are also the first to show how they store and use the images inside their tiny brains," el Jundi says in the statement.

Researchers say the beetles make the snapshot while "dancing" atop their ball of dung. As the Two-Way previously reported, this poop-pile jig helps the beetles determine which path away from the dung is the best route.

After the dancing and the picture-taking, the beetle is ready to roll. It uses the mental snapshot to help navigate its way through its present environment, the researchers said, explaining their scientific process:

"The experiments were performed in South Africa at a facility where the dung beetles only had access to an artificial firmament to orient themselves. Because the sky was artificial, the researchers were able to regulate the amount of light, as well as change the positions of the celestial bodies. Put simply, this allowed them to compare how the beetles changed direction depending on the placement of the artificial sun or moon, etc."

Researchers in Lund first discovered in 2013 that the dung beetles were using the heavens to guide their hasty dung-heap getaways. As NPR reported at the time, getting the balls to safety as quickly as possible is paramount to survival.

"They have to get away from the pile of dung as fast as they can and as efficiently as they can because the dung pile is a very, very competitive place with lots and lots of beetles all competing for the same dung," zoologist Eric Warrant from Lund told All Things Considered three years ago.

"And there's very many lazy beetles that are just waiting around to steal the balls of other industrious beetles and often there are big fights in the dung piles," he said.

After conducting an experiment in which some beetles wore cardboard hats that blocked their views of the stars, the researchers determined that "dung beetles can roll their balls of dung in straight lines by using the Milky Way as a compass queue," Warrant said. He added that the tiny waste harvester wearing the cardboard hats just "rolled around and around and around in circles. They couldn't keep a straight path."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.