Sure, Caesar and his hyper-intelligent apes can operate machine guns, ride horses, and in a couple cases, speak English. But for the most part, the simians in the new Planet of the Apes series are pretty true to modern-day apes. Advanced motion-capture technology, extremely physical acting, and attention to detail help make the chimpanzees and gorillas in War for the Planet of the Apes staggeringly realistic… even when they, quite literally, go apeshit.

There are some shitty spoilers for War for the Planet of the Apes below.

Towards the end of War, Caesar and his ape family have been captured and imprisoned by Woody Harrelson’s militaristic human group. In order to escape, the apes, lead by Caesar’s right-hand chimp Rocket, come up with a very ape-like plan. A human guard is minding his own business on patrol when the apes nail him in the back of the head with a watery, black turd. The guard is understandably enraged, so he enters the prison yard to get revenge on the ape that chucked crap at him. Rocket flings another handful of shit at him, before some hiding apes pounce to take him down, grabbing his keys and enabling their escape.

Rocket, the poop-thrower. 20th Century Fox

It’s a fun moment, but begs the question: Is this stinky escape plan outside the realm of possibility for normal, un-enhanced chimpanzees?

“Maybe not by much, actually,” Stephen Ross, Ph.D. Director of the Lester E. Fisher Center for the Study and Conservation of Apes at Chicago’s Lincoln Park Zoo, tells Inverse.

Chimpanzees are prolific poopers with a pretty good arm and advanced cognitive skills. All of this comes together to make one of the funniest parts of War for the Planet pass the smell test.

“Just like humans, chimps defecate every day, pretty much,” Ross explains. “So here at the zoo, one of the big rules of the zookeepers is to pick that up.” Quite frequently, though, the zookeepers aren’t the only ones picking up poop — the chimps do plenty of that.

“Throwing with chimps is actually not rare at all,” he says, adding that although both wild and captive chimps have been seen throwing feces, almost no other non-human animals throw poo, or anything else.

Not all poop-throwing is the same. Often a mad chimp might just toss poop in a haphazard way, not really aiming so much as just causing a fuss. “But then, chimps also engage in aimed throwing too. So very specific throwing at a target,” he says.

Wait, you might be saying. Chimpanzees can throw poop? Well, no shit. What’s really interesting is why they throw it — and this is where feces-throwing as an escape plan becomes feasible.

“It’s very much to attract the attention of an individual outside of their reach,” Ross confirms, legitimizing Rocket’s master plan.

“It’s sort of a form of deception. They’re trying to get away with something. And that is also a fairly advanced cognitive ability. You have to be able to know what the other individual, in the case a human, is thinking, and try to sort of fool them,” he explains. “So, in this case, there’s throwing, which is a relatively common behavior in chimps, and doing it with the intention of deception. I think both of those are within the realm of possibility.”

Ross adds that even the idea that normal chimpanzees might recognize the significance of a key isn’t too farfetched, listing a plethora of safety measures meant to keep them inside their habitats. “That’s done because of the potential that these very intelligent animals could figure it out very quickly if given the chance,” he says.

So, were the filmmakers behind War for the Planet of the Apes thinking about the potential realism of their poop-flinging great escape scene? Not really.

“We were playing with that trope about monkeys flinging their poop,” Mark Bomback, a screenwriter on the film told Inverse’s Ryan Britt during a conversation for another story.

“When you work on these movies for a few years, lots of people make monkeys flinging poo jokes,” Bomback said. “So, we were like, what if we try it? And we wrote it on the page as ambiguous: mud/poop. But it clearly reads as poop! I don’t know if there’s anything necessarily species-accurate about the flinging of the poop, but we’re just sort of playing with that joke.”

That Bomback and director Matt Reeves joked their way into a surprisingly accurate representation of chimp behavior is telling.

“It’s a pretty neat thing that even a small little scene like that can really be indicative of the intelligence and importance of these animals,” Ross says.

War for the Planet of the Apes is currently in theaters.