You've just closed your front door on your way out, but you realize you've forgotten your key.
It's a problem many people have faced, and it's more common with age.
Now facial recognition technology has come to the rescue in Beijing's western Shijingshan District.
The Huanweilou community has upgraded the entrance security system of four buildings with facial recognition devices. Residents no longer use a key or card; they just smile at a screen to unlock the gates.
A Beijing technology company installed the government-funded system and collected the residents' images.
Every household has installed a videophone, so residents can see visitors who ask to come in.
"It will ensure the safety of residents by keeping strangers out," says Zhang Xiaomei, director of the community.
"It also helps the elderly people who often forget their keys or cards when they go out. Scanning their face is easy and convenient."
The community is also installing five elevators in old buildings ahead of other communities in Beijing.
All the apartment blocks were built in the 1980s and are five or six stories high, but the lack of elevators makes access a burden for elderly folk in the upper floors.
About 40 percent of Huanweilou's 600 residents are over 60, says Zhang, and 36 elderly people have no children living near them and don't want to go to a retirement home.
In the past, emergency treatment was often delayed, because a doctor and a nurse could not carry a patient downstairs quickly and without help from neighbors.
"Some senior residents in higher floors were not allowed out by their children; some even moved out of the community to rent homes nearer ground level," says resident Liao Shuxiang, 78.
China had more than 230 million people aged 60 or above at the end of 2016, or 16.7 percent of the total population. This group is expected to be a quarter of the population by 2030.
In 2016, the Beijing municipal government set a policy to install elevators in older buildings. This year 200 elevators are planned and the number is expected to reach 1,000 by 2020.
However, many communities are divided by the plan, with those on lower floors worried the elevators will block sunlight and ventilation.
Finance is another problem, with elevator installation costing at least 600,000 yuan (about 93,500 U.S. dollars), says Zhang. The government usually pays a third of the cost, but the remainder and maintenance costs are shared by residents.
In Beijing's Daxing District, one community plans to charge residents 0.2 yuan for each elevator ride. Some residents have suggested using apps to create a payment code, but many elderly folk are uncomfortable with modern technology.
"Most retired people get a pension of just 3,000 yuan a month, and they have to pay medical bills too," says Zhang. "It's unlikely they'll want to spend money on riding the elevator."