A little over a year ago things were looking grim at Linton Country School near Palmerston North.
Its roll down to one student, it was recovering from a fire in the staff kitchen, its principal was absent on sick leave and there was talk the 129-year-old school would be forced to close.
Yet today things have turned around in a big way: Its roll has climbed to 12, it has a new principal, a new kitchenette is being built – and it is in with a chance to win $25,000 towards teaching resources.
The school, which has had a roll as high as 90 in the past, is one of five finalists in the Energising Young Minds competition part of the School-gen programme run by Genesis Energy which aims to bring solar energy and efficiency to life for students.
Like the other four finalists - Tangimoana School (14 students) near Palmerston North, Aka Aka School (22 students) near Pukekohe, Makara Model School (57 students) near Wellington and Waikino School (53 students) near Waihi - the school is putting the finishing touches to its submissions to the judging panel before the winners are announced on April 30.
Each of the five schools are to provide a panel of judges information on the challenges they are facing teaching science, technology, engineering and mathematics (STEM), how they are trying to overcome these and ideas on how they would spend the funding.
Genesis is giving away $25,000 to the winner along with two other prizes of $15,000 and $10,000. Almost 700 schools throughout the country entered.
The competition has been running since February and is aimed at giving more schools access to School-gen's free teaching resources. The five finalists have been determined by votes from the public (which has been divided by the school roll to take account of its size).
Principal Katy Marsh says Linton Country School is now in a "good place". But at the end of 2016 the outlook for the school - built in 1889 - was not looking positive.
"The roll had previously been at 12, but a lot of students were leaving to go to secondary school," she says. "By the end of 2016 there was only one student returning for 2017; we had had the fire (it broke out in October 2016) and there was a lot of discussion about whether to keep the school open.
"Fortunately the decision was made to keep it going, that with the right management it could once again thrive. They appointed me as a permanent principal and I started here at the beginning of the second term last year."
Marsh believes Linton has a bright future. "We are not isolated as we are close to a big city (Palmerston North) and because many of the other schools around us are full to capacity I believe the roll will increase."
She is the sole teacher at the school (the students range in age from five to 12) although a relief teacher helps with lessons over three days every fortnight: "I feel like I have pressed three years of teaching into one, it certainly requires a lot of energy."
Marsh says she works closely with a cluster of five other schools in the area with a combined roll of about 500. If Linton were to win the competition it has a number of plans on how it could spend the money - including building a mobile science lab and expanding its calf and lamb rearing programme to include goats.
"We are slap bang in the middle of a farming community here and we have lots of support from the community and parents," says Marsh. "Some of our children are from the city and come here for this reason – and this year we are looking at rearing goats so our kids can learn how to milk and make cheese."
Marsh says the school would also like to equip its students with iPads, laptops and chrome books - and look at using robots to assist in class: "We want to give our children a chance to immerse themselves in digital technology and if we don't have up-to-date equipment they are at a disadvantage and can be left behind."
The School-gen programme has been running since 2007 with 92 schools taking part. Genesis has supplied each of the schools with solar panels and provided an education programme centred on energy efficiency and sustainability.
The panels allow schools to generate a portion of their own electricity with the programme having recorded more than 405,445 kWh in the last eight months, enough to charge an average electric car 13,500 times.
Genesis CEO Marc England says it has a responsibility to encourage imagination and curiosity among New Zealand's young minds, especially in the STEM subjects.
"School-gen is one way we're applying our expertise to do this," he says.