Though you may not know his name, Kim Peek directly inspired Dustin Hoffman’s role in the Oscar-winning film Rain Man. He died from a heart attack on Saturday morning. Peek was 58, and perhaps one of the world’s most famous savants. He couldn’t perform basic tasks like using a light switch, but he had a seemingly bottomless memory.

After meeting Peek at a convention in the early 80s, writer Barry Morrow was so taken by his abilities that he ended up writing Rain Man. The film went on to win four Oscars: Best Picture, Actor, Director, and Original Screenplay.

In his later years, Peek was classified as a mega-savant who was a genius in about 15 different subjects, from history and literature and geography to numbers, sports, music and dates. But his motor skills were limited; he couldn’t perform some simple tasks like dressing himself.

Peek suffered from a rare birth defect, agenesis of the corpus callosum, which basically meant that he was missing the bundle of fibers that connected both hemispheres of his brain. He was also the subject of NASA MRI research to figure out how exactly his memory skills worked.

Daniel Christensen, a clinical professor of psychiatry that worked with Peek over several decades, had this to say about his condition:

“He had a bottomless memory…” Peek had the ability to recall facts and patterns about history, mathematics, music and geography but, adds Christensen, “the ability to take those things … and use them, to reason with them, make sense of them, to know the implications, to make judgments based on them, that’s a very different thing. And that’s sort of where his mental abilities ended.”

You can view the first part of the documentary The Real Rain Man below: