EVERY week, pupils from Ysgol y Berwyn in Bala, north Wales, turn up for lessons on a Sunday morning... with their family dog.
For these youngsters have added another subject to their timetable - sheepdog handling. Teacher Maralyn McNaught puts the 15 youngsters and their dogs through their paces on a farm in southern Snowdonia and once a year they have a chance to show off their skills at the school's own sheepdog trials.
Miss McNaught, daughter of a local farmer, has an agricultural science degree and has represented Wales in international sheepdog trials.
The sheepdog-handling classes are just one part of an innovative programme that is designed to motivate disillusioned youngsters and provide better-skilled workers for the local agriculture-based economy.
Fifteen pupils a year can opt to study a national vocational qualification in agricultural studies or construction alongside other GCSEs. But other youngsters are also encouraged to take an interest in the school's own farm, which has a flock of 30 sheep.
The move to broaden the 460-pupil school's curriculum began seven years ago. "There was a cohort of children who were underachievers with a tendency to be disruptive, and so we embarked on an agricultural vocational course," says headteacher Geraint Owain.
With 90 per cent of the school's pupils coming from a farming background, and with the expectation that they will follow in their parents' footsteps, the school tried to cater for those pupils who had little interest in academic work.
They spend the equivalent of a day a week on the NVQ subjects and the rest of their timetable is made up of science, maths, English and Welsh.
"It has improved pupil morle and is an excellent way of ensuring that they attend school," said Mr Owain.
Miss McNaught said the NVQ courses were going from strength to strength. "Many children are very keen to carry on the family farming tradition. It also gives them an opportunity to succeed on a course.
"A lot of pupils are disillusioned and don't want to be in school, but their personality changes as they progress through the course. They do mature very quickly.
"Most of them go to agricultural colleges and most go back to work on the farm or on to some career in the agricultural industry."
The NVQ courses have proved so popular with pupils and the local community that the school decided to involve local farmers. When the school farm was set up in 1996, farmers donated equipment and livestock.
In addition, links with local farms have enabled pupils to follow programmes in sheepshearing, as well as rearing and preparing sheep for auction at local markets.
Pupils can also take part in a lambing care programme over the Easter holiday, and a small number of the school herd's black sheep are groomed for country shows during the summer holidays.
Last year the school ran its first evening adult education course in ICT, after discovering that poor administrative skills were depriving local farmers of grant aid. It also ran a Welsh ICT course in farm administration for parents and pupils.
"Unemployment is not the problem here - it is just very low paid manual work," said Mr Owain. "Many families have between pound;4,000 and pound;8,000 a year to live on and the economic forecast is abysmal."
By offering courses in new technology and harnessing pupils' interests in carrying on their families' traditional way of life, Ysgol y Berwyn is playing a crucial role in keeping a struggling community alive.