Before a body slides into a morgue or is lowered into a grave, how can we know if someone is really dead? As medical science advances, the guidelines to determine death have changed, too.

Miracle Max from “The Princess Bride” once assured us that “there’s a big difference between mostly dead and all dead.” It was a funny line in the movie but it can be true in real life, and it brings up a question of when someone has reached a point of no return — when we should give up on our family members and friends. Some experts want a clear answer to the question, a standard medical definition of death updated for today’s world that could be used, for example, to determine when to start harvesting organs from a donor.

We don’t die all at once; just like love and travel, death takes time. And some disagree on when in that process a person becomes officially dead.

“It can take up to a week until the final cell in the body has died off,” Stephan Marsch, Intensive Care Unit head at the University Hospital of Basel in Switzerland, said in a statement from the Swiss National Science Foundation.

Read: Would You Ride in a Driverless Ambulance?

That’s not to say a person can be revived until that final cell dies — if the brain and the heart aren’t working and the body is already decomposing, there’s not a lot doctors can do. But at the same time, as medical science progresses and we have learned more about disease and dying, physicians have been able to bring back people who in previous eras would have been lost causes.

In the case of cardiac arrest and CPR, it wasn’t until 1903 that a doctor first successfully used chest compressions to revive someone, according to the American Heart Association. The last century of medicine has been one of constant discovery and improvement, from vaccines preventing infectious illnesses all the way to new tools that could change a person’s DNA. Still, given the rare cases of people waking up in body bags or morgues, it’s possible we don’t even know as much as we think we do about when a person is actually dead.

Currently, “if, in line with accumulated experience, a person cannot come back to life, or cannot be reanimated, then he or she is regarded as dead,” Marsch said.

In a lot of cases, that means brain death, in which the brain fails and the brain stem stops functioning, even if some automatic or lower-level bodily functions continue. And Jürg Steiger, from the University Hospital of Basel’s Department of Transplantation Immunology and Nephrology, says that kind of death is different from when other organs cease working.

“The heart is just a pump that you can replace with a mechanical device if necessary,” Jürg Steiger said in the science foundation statement. “For me, life occurs in our head: pain, love and hate. … If the brain doesn't function any longer, a central aspect of your personality also disappears.”

See also:

Here’s Why Nerds are More Likely to Survive a Heart Attack

Do Vaccines Still Matter?