It all goes back to the countless hours Huzaifah Khaled spent on trains and in train stations, shuttling back and forth between his home in Nottingham, England, and classes at the University of Cambridge, 145km away.
"In the UK, train stations are almost magnets for homeless people," Khaled said. "When I'd be waiting for trains, walking to and from the train station ... I came into contact with a lot of them."
He talked with them, bought them coffee, and over time, developed relationships with them.
"I essentially developed a very deep understanding of their needs," said Khaled, who recently got his PhD in law. It hit him that, for the homeless, even basic necessities are hard to access, and the limited hours for drop-in services at day shelters meant people had to schedule their days around visits to the shelter, making it hard to hold a stable job or see family regularly.
"I realised that there had to be a more effective way of getting at least the bare necessities to them," he said.
That's how he hit on the idea of a vending machine for the homeless: a 24/7 pit stop where people can access free food, clothing and other basic supplies.
The first vending machine launched this month in a shopping centre in Nottingham, stocked full of supplies like water, fresh fruit, energy bars, chips and sandwiches, as well as socks, toothpaste, toothbrushes and even books. The machine was installed by Action Hunger, a charity directed by Khaled.
The initiative has been close to two years in the making. Back in early 2016, he had toyed with the idea of installing stocked fridges in cities across the UK. But fridges posed challenges for keeping track of supplies, so he switched gears and focused his attention on vending machines instead. He devoted weekends and evenings to the project, all the while working toward his PhD.
"I speculatively approached over 50 manufacturers across England and Europe — most ignored my proposal, a few politely declined, and just before I was about to give up and try to raise funds to buy a machine instead, [N&W Global Vending] responded to my letter and invited me to pitch the idea to them. They came on board almost immediately afterwards."
N&W Global Vending, one of the world's largest vending companies, gave Khaled a £10,000 machine for free.
Khaled contacted the Friary, a day centre serving the homeless in the Nottingham area. Now, as a partner organisation to Action Hunger, the Friary gives out keycards to its patrons, which are programmed to permit up to three items being dispensed per day. Users have to show up at the Friary once a week to continue receiving access to the keycards.
The idea is users do not become dependent on the machines, and are working towards a long-term plan for getting off the streets, Khaled explained. He wants Action Hunger's low-cost vending machines, which are restocked daily by volunteers, to complement other existing services, and believes continued engagement with local support services is key to ending the cycle of homelessness.
Khaled hopes to expand quickly across the country, as well as across Europe and the United States. A machine will be installed in New York City in February, followed by San Francisco, Seattle and Los Angeles. Action Hunger has partnered up with Rescuing Leftover Cuisine, a food rescue non-profit based in New York City, and is also in talks with Tyson Foods.
Over the next month, Khaled and his team will monitor which products in the machine are in highest demand, and which aren't as highly sought after. In the longer term, they want to crunch data from the keycards to figure out whether giving someone access to free basic necessities contributes to helping them get off the street.
"Homelessness has become so accepted in our society that we often don't even look at these people," Khaled said.
"In an ideal world, I would never have needed to start this charity. I would love nothing more than to shutter this charity next week."