Though Stephanie Garber began writing her first novel as a way to unwind from her job as a college resident director, it quickly became more than just a hobby. “Part of why I eventually pursued publication was so that I would have a valid excuse to spend all my time writing,” she admits.

Garber wrote three books and got “about 200 rejections” from agents before her fourth finished novel—a space opera called Lost Stars Broken Galaxy—garnered representation. That book failed to sell, though, so Garber sat back down at the keyboard and tried again. She reminded herself that the process was supposed to be fun, and endeavored to write a book that she, as a reader, could get lost in—a YA fantasy set in a bright, colorful, over-the-top world (“like a Baz Luhrmann movie”) where it was possible for a disillusioned teenager to rediscover her sense of wonder. Garber poured everything she had into this new project, even going so far as to move in with her parents so that she could work fewer hours and spend more time writing.

The end result was Caraval (Flatiron, Jan.), a tale about two sisters who run away from home to participate in an elaborate, multi-day event that’s part performance, part treasure hunt, and the closest thing to magic that exists in this world. “I was so obsessed with this story,” Garber recalls. “It was just something I felt like I had to write.” Unfortunately, about a week after she completed the manuscript, Garber’s agent left the business. Those around her saw this as a sign: “I started getting lots of job opportunities in my inbox from concerned friends and family members.” But Garber refused to give up. Choosing to see it as a chance for a fresh start, Garber embarked on a search for a new agent. She promptly received a number of positive responses, and about seven weeks later, signed with Jenny Bent of the Bent Agency.

Bent had a large impact on the version of Caraval that was eventually shopped to publishers. “I knew that my book was as good as I could make it on my own, but I also knew that that draft wasn’t as good as it could be,” Garber says. “I liked that Jenny said, ‘I love this, but it needs work.’ I felt really comfortable with her, and I trusted her.” Garber and Bent spent around two months doing intense revisions on the manuscript—and it paid off.

“The day after we went out on submission, I woke up and there were text messages from Jenny. They were really funny. ‘Are you awake?’ And then she was like, ‘This is your agent,’ like I didn’t have her number programmed into my phone,” Garber recalls. She then discovered she’d also received direct messages from Bent via Twitter. When the two connected, Bent told Garber that she’d heard from an editor who’d read the entire book in one night and loved it. Garber was so excited that she woke her parents and read them the texts while screaming and sobbing in her pajamas. Caraval ultimately sold at auction to editor Sarah Dotts Barley at Flatiron, but to Garber, it was that morning when she knew the book would find a home. It was one of the best moments of her life.

Garber is now at work on a sequel to Caraval—an endeavor made much easier by the fact that, late last year, she took leave from her job as a creative writing instructor. “I was working to get published, but I never dreamed that I could do this full-time. I never, ever dreamed that, and I’m really grateful,” she says. “It’s been like a dream come true.”