What do you do when a loved one dies? The answer depends on the circumstances of the death, religious customs of your community and the desires of the deceased, but it usually boils down to a mortuary, a funeral home and a cremation or funeral. In Japan, however, there’s another option for the dearly departed, reports Motoko Rich for The New York Times: Take them to a corpse hotel.

Japan’s corpse hotels still involve cremation, but they put a twist on the age-old tradition. And, reports Rich, they serve another purpose: They provide storage for bodies that must wait days for a place in one of Japan’s busy crematoria. Corpse hotels are also places that families can gather to hold vigils and affordable funerals. And when they're not spending time with their loved one’s body, families have a nearby place to rest.

With an aging population and a rising death rate, cremation overload is a real problem in the country. As Al Jazeera’s Drew Ambrose wrote in 2015, Japan has the world’s highest cremation rates at 99 percent. That means waits of up to four days for the remains to be cremated. And with too few crematoria in high-population centers like Tokyo, things are only expected to get worse.

As Japan Times’ Mizuho Aoki notes, these corpse hotels, known as itai hoteru in Japan, were invented as an alternative to sparse morgues where bodies were kept in impersonal cold storage. Despite their friendlier faces, the hotels are often met with protest from residents who don't want to live so close to the establishments.

Creepy or not, it’s an ingenious solution to a growing problem. Other countries have tackled their death dilemmas differently. For example, as Smithsonian.com reported in 2013, China subsidizes cremations in a bid to tackle dwindling cemetery space. And Hong Kong, which faces a similar cemetery crunch, will soon have a floating columbarium capable of hosting the cremated remains of up to 370,000 people at sea.

Meanwhile, cremation is becoming more popular in the United States. However, crematoria and the cemeteries where remains are eventually buried contribute to environmental problems with emissions and high water usage. As long as people keep dying, the ones left behind will have to keep brainstorming better ways to deal with their remains—even if there’s a long waiting list.