The BBC's weekly The Boss series profiles a different business leader from around the world. This week we speak to Charlie MacGregor, founder of student accommodation group The Student Hotel.
Scot Charlie MacGregor says he will never forget watching the boats full of desperate refugees and illegal migrants trying to come ashore on the Greek island of Lesbos.
"Some boats didn't know where they were going, so would end up on the rocks," says the 42-year-old. "Some [of those onboard] didn't even make it.
"The lucky ones that did were often terrorised, not only by the journey, but [fearing] what would happen to them next."
This was in October 2015, when more than 2,000 people in unauthorised boats were arriving on Lesbos every single day, most of them Syrians escaping civil war.
Charlie was a volunteer on the beaches, helping to direct the boats safely ashore, and then offer the men, women and children water, food and other assistance.
He had been moved to fly to Lesbos to help after a friend had posted on Facebook about the situation just a few weeks earlier.
"As a dad with two kids my heart really went out to these families that were trying to get to the island," he says. "There were young kids, women, all traumatised after fleeing war-torn countries."
In going to Lesbos Charlie had taken time off from his day job as founder and boss of student accommodation company The Student Hotel (TSH).
Today the Scottish businessman balances his time running TSH with helping to lead the charity he co-founded in 2016, Movement On The Ground.
The charity helps refugees "from the moment they arrive in Europe, until they're safe and sound in their new home country".
Born and raised in Edinburgh, Charlie says that "student accommodation is in his blood".
His father had built student homes for the University of Edinburgh in the 1980s, and Charlie started his career working on those building sites at the tender age of 16.
A few years later he used two loans - one from a bank, and one from his dad - to launch his own student accommodation company in Scotland.
More The Boss features:
Then in 2003, aged 27, he decided he wanted to live abroad. So he sold up, repaid the loans and moved to Amsterdam to launch TSH.
The idea for the business was a pan-European chain of fashionable student accommodation buildings that are also hotels open to members of the public. So while most occupants would be students on long-term lets, business travellers or holidaymakers could rent rooms by the night. And there would be onsite restaurants, bars and gyms.
Charlie was convinced that the idea would work, but others were less than enthusiastic.
"When I first thought of the concept I was literally laughed out of a meeting when I presented my idea to a room full of developers," he says.
Undeterred, Charlie kept pitching his plans, and eventually a bank decided to back him. The first Student Hotel opened in Rotterdam in 2006, with other Dutch sites following.
Then the global financial crisis hit in 2008, and the business ran into trouble.
"Six times I gave the keys to the company back to the bank," says Charlie.
"The saving grace was that there was also no-one else in the market who would, or could, buy the buildings, so even though the bank tried to sell them, they couldn't."
As a result the bank kept allowing Charlie another go at running the business, and eventually he was able to ride out the storm.
Today TSH has 11 sites across Europe, from Barcelona to Dresden, and another 12 in development, from Lisbon to Rome. Locations in the UK are also now being explored.
Two years ago Dutch pension fund ABP invested €100m ($115m; £87m) in the business, and TSH says its annual turnover is now due to surpass €75m.
Architect Andrei Martin, a partner at UK firm PLP Architecture, says that TSH is helping to lead "an exciting development" in student housing, making it of a higher, more appealing standard.
"Operators like The Student Hotel, who cater to a predominantly - although not exclusively - young demographic are radically reshaping our expectations of student housing," he says.
But if running TSH was not enough work for Charlie, he spends part of each working day helping to look after things at Movement On The Ground, and visits Lesbos four or five times a year to help out personally.
Initially Charlie and the four other co-founders funded the charity themselves, but it now relies on outside donations.
Work the charity has so far done in the refugee and migrant camps on the island includes working with the Red Cross and Doctors Without Borders to introduce toilet and shower facilities, and weatherproof tents.
It has also started a football programme for children, and set up digital learning labs, so that the refugees and migrants can use the internet, learn to touch type and to code.
"Football is a great way of bringing people together," says Charlie.
"And if people can leave the camp with a qualification for typing or coding, it would give them better opportunities."