Harry Potter fans who have already finished reading The Cursed Child and A Journey Through the History of Magic from the past two years have a new chapter in the story of the wizarding boy to tide them over—one brought to us not by J.K. Rowling, but by AI-generated text prediction. Botnik Studios created the three-page chapter, titled “Harry Potter and the Portrait of What Looked Like a Large Pile of Ash,” after training an algorithmic tool on all seven of the children’s fantasy novels. The end result is a tale with a plot that feels soulless and meandering but like any good fanfiction, still holds a faint imprint of Rowling’s usual lilting whimsical charm.

Both the chapter and the predictive text program—available on GitHub—is the work of Jamie Brew, a former writer for Clickhole and The Onion. His predictively generated work previously appeared on objectdreams Tumblr and includes predictive text X-Files scripts, Craigslist ads, and Elements of Style-esque grammar rules.

The aforementioned Harry Potter excerpt was constructed with the help of multiple writers, who helped construct the sentence through a combination of algorithmic suggestion and authorial discretion. As a result, the chapter reads not like the usual word salad of text prediction, but like unusually inventive fanfiction. “The castle grounds snarled with a wave of magically magnified wind,” it begins. “The sky outside was a great black ceiling, which was full of blood.”

Things get a little weirder when Ron starts doing a frenzied tap dance, turns into a pile of spiders, and tries to eat Hermione’s parents, not to mention when the password to their dormitory door is changed to “BEEF WOMEN.”

We used predictive keyboards trained on all seven books to ghostwrite this spellbinding new Harry Potter chapter https://t.co/UaC6rMlqTy pic.twitter.com/VyxZwMYVVy — Botnik Studios (@botnikstudios) December 12, 2017

There are plenty of Harry Potter fanfics that explore outlandish scenarios— those featuring a pregnant Voldemort, for instance — and ones of impressive quality. Fanfiction is often used as a stepping stone for writers to get comfortable with language and worldbuilding. The process used by Botnik, which the company refers to as “collaborating with machines,” mixes the creativity of dozens of humans with the absurdity of machines trying to imitate us, and the result is sometimes, dare I say it, magical. BEEF WOMEN.