How does Holyrood's electronic voting system work?
The Scottish Parliament's voting system has come under scrutiny after a missing vote let the government narrowly dodge a defeat. So how does the system work?
It's supposed to be a simple, efficient system which takes some of the drama out of parliamentary procedure - but for once Holyrood's electronic voting system has found itself at the centre of attention.
The Scottish government was braced for defeat following a council tax debate, but unexpectedly found the result come back a tie, with Scottish Labour leader Kezia Dugdale's vote mysteriously absent.
Ms Dugdale was adamant she had pressed the button to vote; the parliamentary authorities are equally adamant that there was nothing wrong with the system.
There has been the odd issue of people voting the wrong way or not voting at all in recent years, but never one which has occurred at such a vital moment - or indeed concerning such a prominent MSP.
So how does Holyrood's electronic voting system work?
How does the system work?
The Scottish Parliament, which was opened in 2004, features an electronic voting system which allows members to vote quickly and efficiently from their desks.
In the Holyrood chamber, each individual desk is equipped with a small computer console through which members can request to speak in debates, and vote at the end of them.
They have to insert their parliament pass into the computer to operate it, and when it comes to votes - conducted at what is known as "decision time" - there are buttons for them to either vote Yes, No, or Abstain.
Most chamber votes are conducted in this manner - although the election of the presiding officer and deputies are still conducted using paper ballots.
Have there been problems before?
The state-of-the-art system has suffered the odd technical glitch in recent years.
The whole system ground to a halt following a debate on education in June, forcing Presiding Officer Ken Macintosh to postpone decision time until the following day - not the first time such a delay had been forced.
There have also been some prominent cases of user error. In a vote prior to the EU referendum, newly elected Tory MSP Maurice Corry accidentally logged himself as a Brexiteer by pressing the wrong button.
The system as a whole actually had to be replaced in 2011, at a cost of £270,000 - although this was because the supplier was no longer able to provide spare parts.
But for the most part, the system is almost taken for granted - it is used more or less daily when parliament is sitting, with controversies few and far between.
What are the alternatives?
At Westminster, members have to get up and walk through lobbies to register a vote. They are given eight minutes to get into the right lobby after the division bell rings, after which the doors are locked and whips tally up those present.
It should be noted of course that even this low-tech model can have its problems - such as the time SNP MP Angus MacNeil accidentally walked into the wrong lobby and had to hide in a toilet so he wouldn't be counted.
The Northern Ireland Assembly copies the Westminster model, with members dividing in to Aye and No lobbies if there is not a unanimous 'voice vote'.
But like Holyrood, the Welsh Assembly has an electronic voting system, as does the European Parliament.
In fact, electronic systems have proved so reliable and useful that some have called for one to be installed at Westminster - although the practicalities of how this would work in the House of Commons have been disputed.