“If there’s a mystery you can’t solve, I will,” pledged 11-year-old Sarah Salas in a recent letter to Mac Barnett, author of the Brixton Brothers mystery series from Simon & Schuster. A devoted reader of the series, whose launch title tells of a mystery-loving boy who inadvertently becomes involved with undercover agents who are also librarians, Sarah explained to Barnett that she is a “private undercover detective but I haven’t spread the word, plus I am a beginner.” Charmed by her letter, Barnett decided to take her up on her offer, and sent her a case to crack via her local librarian. Here’s how he dunnit.

The author first trotted out some sleuthing skills of his own, using Sarah’s return address to track down her local library branch, Capital Hill Library in Portland, Ore. He contacted youth librarian Natasha Forrester and enlisted her help. “I thought a library would be a good place to set the mystery, and I wanted to send Sarah from book to book to solve it,” says Barnett. “I knew I would need a confederate at the library, yet when I called I was afraid I might sound like an insane person. But I was lucky, since Natasha knew the Brixton Brothers series and was immediately game.”

“I was thrilled when I got his call,” Forrester recalls. “I think it is such a cool idea for an author not only to respond to a young reader’s letter, but to give her a little puzzle to figure out. I love Mac Barnett’s picture books and had read the Brixton Brothers books, so I was familiar with his name. This really made him go up considerably in my opinion.”

Barnett sent Sarah a letter that contained three clues and instructions to go to the library and ask for Forrester. The clues, one of which was written in lemon-juice invisible ink, pointed Sarah to a specific page in The Economist Desk Companion, which revealed another set of clues that sent her searching through The Westing Game for a code word to be delivered to the librarian. When Sarah at last cracked the code, Forrester presented her with a drawing by Adam Rex, illustrator of the Brixton Brothers books, signed by him and Barnett, plus an official Brixton Brothers detective’s license.

“It was harder than I thought,” says Sarah of the challenge Barnett devised for her. “It took me a couple of weeks to solve, and when I finally did I felt super proud of myself.” A self-described “big fan” of the Brixton Brothers books, she explains, “I like everything about the books, but I especially like how Mac makes you feel like you’re right there in the book.”

Sarah and other Brixton Brothers fans will get a chance to immerse themselves in another of their mysteries in October, when Simon & Schuster publishes the third installment of the series, It Happened on a Train. Sarah, who wants to be a professional detective someday, ended her letter to Barnett with a plea that he write a Brixton Brothers handbook (much like the Hardy Boys-inspired handbook that the series’ characters use as a guide). She mayget her wish. “That’s always been a dream of mine,” Barnett remarks. “I have pieces of a handbook show up in the novels, and I think that it would be fun to write one.”

And does Sarah have any interest in following in Barnett’s footsteps and write mysteries herself one day? She’s wasting no time on that front. “I’ve already started one,” she replies. “It’s called The Stolen Jewelry.”