Madagascar doesn't often feature in the headlines. Despite being the subject of a series of hit animated movies in recent years, some people would struggle to pinpoint the country on a map.
It's also one of the more unlikely countries where you would expect to find a New Zealander running his own social enterprise project.
Located off the southeast coast of Africa and home to 5 per cent of the world's known biodiversity, including its famous population of lemurs, this former French colony also happens to be the world's fourth largest island.
It's also rated by the UN as one of the world's poorest countries, with an estimated 90 per cent of its 24 million residents living on less than $3 a day.
For 29-year-old Sam Lucas, Madagascar has been his home since 2015, after launching an ambitious education and training social enterprise that is already improving the lives of a group of talented students. His is a story of perseverance and determination against the odds that began in 2009.
After completing his final year at Westlake Boys High School on Auckland's North Shore, and restless for an overseas adventure before embarking on an engineering degree, Lucas decided on a gap year backpacking through Europe. However, he eventually found himself in Ghana, teaching English and maths as a volunteer. The experience was to have a profound effect on him.
"Like most backpackers, I didn't have a lot of money at the time and I came to rely on and trust in the kindness of strangers. I lost count of the number of people who took me in, gave me a place to sleep, food to eat and unreserved kindness I could never repay.
"The experience made me think long and hard about what I wanted out of life and only increased my desire to do something meaningful."
Along the way, he also taught plenty of very smart students whose job prospects were just about zero.
"I think this was the aspect of my time away that affected me the most, knowing it was very unlikely any of this talent would ever be developed to its full potential."
Returning to New Zealand in 2010 to start his university engineering studies, it wasn't long before he was once again packing his bags: this time for Cambodia and Laos, to teach English during his summer holiday.
Once again, he found highly motivated students who were hungry to learn and valued the opportunity to improve their English. It led to an idea Lucas was keen to test: continuing to teach the students from New Zealand using Skype, but also including coding in the teaching programme.
Lucas recruited a group of fellow students at the University of Auckland's Engineering School and their lessons proved popular, as the students in Cambodia lapped up the opportunity to learn a subject few would otherwise have had the chance to study.
Graduating with his engineering degree in mechatronics in 2014, Lucas would have liked to work on his project full-time. But with student debts and bills to pay, he got a job at Fisher & Paykel Healthcare.
Working on the project in his spare time, while managing to save $20,000 towards his starting capital, he says his commitment to the idea was unwavering.
"During my time in the developing world, I was inspired by the incredible commitment displayed by the students I worked with, but at the same time it really concerned me that few, if any of them, would ever be able to attend higher education or find well-paid employment. However, knowing that such brilliant young minds would easily find well-paid work in developed countries, I spotted an opportunity to connect the two together."
And so the idea of a social enterprise model that involved preparing young talent in the developing world to meet outsourceable needs in developed economies began to take shape. One year after starting his corporate job, he handed in his notice to work full-time on turning his vision into a reality.
Like all social enterprises, the model needed to be sustainable. As most of the students would come from poor backgrounds with no ability to pay for their education, an innovative feature was incorporated into the business model. In exchange for receiving a two-year education, the students would agree to work for an outsourcing venture after they graduated. Profits generated by this venture would be fed back into the school to educate more students.
Having conceived the idea, the next big decision was where to base it.
After an extensive study of developing countries, focusing in particular on the availability and cost of broadband, Lucas finally settled on Madagascar, despite having never visited the country.
It was a leap of faith, and Lucas knew he had to gain a proper understanding of the culture.
After arriving in Madagascar for the first time in 2015 and selecting a small, remote village called Ifasina for his immersion into Malagasy culture, Lucas offered to teach the local kids English and work for free in exchange for being taught their language and culture, as well as being given basic food and shelter.
His stay in the village often meant long hours of back-breaking work, knee-deep in mud in the rice paddies. But in time the village came to accept him, despite initially being wary of the lanky visitor who had appeared from a country they had never heard of.
"I am very proud that even now, people in the village still refer to me as a 'son of Ifasina'.
The community taught me to speak Malagasy fluently (later conducting a local television interview in fluent Malagasy), live with very little and even learn the traditional Betsimisaraka (a Malagasy tribe) way of farming rice.
"Living in the village had a big impact on me and gave me a unique understanding of the hopes, dreams and daily challenges of its people."
With no running water, no electricity and few toilets, it was a big change from a comfortable life back in New Zealand, but the experience only strengthened his resolve to launch his project, which he decided to call Onja — a Malagasy word meaning "waves".
After a year, and with a newfound appreciation of Malagasy culture, it was time to move to phase two: selecting the students.
Knowing the programme would be demanding with its dual requirement to learn both English and coding in just two years, it would be necessary to choose students who would cope with the workload.
So began a one-year recruitment programme that involved collaborating with nearly 300 high schools in the Toamasina province, offering students the chance to sit an exam Lucas designed to test language learning ability and computer programming aptitude.
"Reaching prospective students was a real challenge as Madagascar doesn't have a postal service. We sent hundreds of letters through their former schools and even resorted to announcing student names on local radio stations to get the word out. We then spent weeks on the road conducting test sessions in 10 different regions to ensure we cast our net as widely as possible."
Initially, not all parents of the successful students were keen on seeing them leave the family for two years. In villages that rely on agriculture, where every member of the family is considered an important labour resource, losing someone for extended study away from home comes at a cost. But eventually they relented when they realised the opportunity on offer.
The base chosen for the project was Mahanoro, a small costal village Lonely Planet describes as Madagascar's "dead zone" because of its lack of tourist attractions, but an ideal location for Onja.
The area had excellent mobile broadband coverage, and Lucas scored a lucky break when he found an empty two-storey house that was almost tailor-made for his purposes. After tracking down the absentee owner, he secured a five-year lease at an attractive price and Onja finally had a home to move into.
Some hurried modifications turned the downstairs area into a classroom, complete with AV facilities, for the initial cohort of 26 students, while upstairs became an office and staff accommodation.
The students are accommodated in dwellings on the property and in nearby cabins. They're basic, with concrete floors and mats, but then again, most of the students have never slept on a bed.
For some, joining Onja has involved two days of travel, meaning they will only get to see their families once a year, for just a few weeks.
Funding the project to this point has mainly come from friends and family, as well as personal savings which Lucas contributed and donations from a North Shore Rotary Club.
"Initially, I put my entire $20,000 savings into the project to get things started but they didn't last long," says Lucas. "Since then I've relied on contributions from my own family and friends from university and Rotary who have been very supportive."
With money tight, Lucas switched back to his role as teacher supported by an experienced educator from Antananarivo, Mitantsoa Solofoniary, who is also a fluent English speaker.
As word got around, a US Peace Corps volunteer who was living locally turned up offering his services as a teacher, and in response to a message in Onja's monthly newsletter seeking volunteer teachers, Lucas even managed to recruit his relatives, Alex & Kirsten Simhoffer from the Netherlands.
Fast forward to today, Onja is six months into its first two-year programme and the 26 students have become reasonably fluent in conversational English.
Laptops donated by a New Zealand business have also been a welcome addition to Onja's limited teaching resources.
Lucas says the next stage involves gearing up to teach next year's coding module. "We're currently developing a software development course to closely align with market needs. Part of that involves finding some adventurous software developers willing to drop it all and head to Madagascar to share their knowledge with our students."
But will the students stay in Madagascar, and not be tempted to take their skills overseas?
"Onja will give them jobs when they finish the programme. The exact details are still being worked out as we write the contracts, but they're unlikely to be out on their own or looking for work themselves. It will be no small feat to secure work for the 26 students once they are ready for professional coding work but this is certainly our intention.
"Simply heading offshore immediately won't really be an option for them without the necessary work experience and visas etc, to work in places like the US."
Reflecting on his six-year journey to this point, Lucas is the first to admit that launching a social enterprise in a foreign country comes with its own set of challenges.
"I think that above all it takes unrelenting commitment and belief — and a hardworking, trusting team. There are endless challenges you have to deal with, which is why you have to be so determined. The biggest challenge for me: rarely being able to see family.
"But right now, I couldn't imagine doing anything else. Every day I know I'm helping these students develop their skills which will ultimately be beneficial for their lives and for a country that desperately needs more of these kinds of low cost, high impact initiatives."
It's a vision that he hopes will propel Onja into the future and eventually expand into other countries.
"From the very start, we've focused on finding win-win arrangements. Malagasy students that couldn't afford higher education get a world-class education, and a good job. Companies thousands of kilometres away get access to top-level talent. It's a vision we will continue to optimise, and one I see rapidly expanding beyond Madagascar and all over the world. I'm very committed to achieving this outcome."
Student Clopedia's story
I was very happy when I completed lower secondary school and gained my BEPC qualification. Unfortunately, it also meant the end of my education as my parents couldn't afford to send me to high school.
And so I became a farmer just like them, working in the fields to earn money to support the education of my younger siblings who were still in school.
It was a very difficult time for me as I really wanted to continue with my studies. Sometimes I would see my friends going to school and I'd be so sad. I cried a lot at that time, but there was no solution. After about a year I received a letter from Onja.
Because I was one of the best students in my region, I was invited to sit their entrance exam. There were many students like me who wanted to get in and I lost hope after a lot of time had passed.
However, I finally received news that I had been accepted. Then I realised I would have to leave my family and that was one of the hardest decisions I've ever had to make.
But my parents told me I would never get another chance like this so I left them to continue my studies at Onja. I'm doing well ... and after just seven months I've become a confident English speaker.
• The Onja website: www.onja.org
Education: Attended Westlake Boys High School & University of Auckland
Graduated: 2014 with a Bachelor of Engineering degree in mechatronics
Lives in: Madagascar, since 2015