When an Indiana man’s 4-year-old daughter collapsed, he helped save her with CPR while pumping to the tune of the Bee Gees’ 1977 classic “Stayin’ Alive.”

It’s a technique Matt Uber remembered from a 2009 episode of The Office, where Michael Scott has his employees take a CPR class after Stanley Hudson has a heart attack. Today reports that Uber’s daughter Vera Posy collapsed during a game of tag, and he had to do something before first responders arrived.

“When I was trying to think about what do I know about CPR, my mind literally went to that episode of The Office, where they are doing CPR training and doing the compressions to the beat of ‘Stayin’ Alive,’” he said. “It’s just what kicks in, what’s in your head, and that’s fortunate.”

The incident happened on April 25, while Uber and Vera were playing tag. Uber said he “heard a thud” and found Vera “balled up against the corner. My natural assumption was that she had tripped and fallen and hit her head,” he recalled. “When I picked her up off the ground, she was just limp, her eyes were kind of rolled back.”