APPEAL COURT, HIGH COURT OF JUSTICIARY
 HCJAC 45
Lord Justice Clerk
OPINION OF THE COURT
delivered by LORD CARLOWAY, the LORD JUSTICE CLERK
APPEAL AGAINST SENTENCE
HER MAJESTY’S ADVOCATE
Appellant: A Ogg, Solicitor Advocate; Paterson Bell, (for A Mullane & Co, Glasgow)
Respondent: B Erroch AD; the Crown Agent
19 May 2015
 On 12 January 2015, after a trial at the Sheriff Court at Glasgow, the appellant was convicted of an assault to severe injury, permanent disfigurement and permanent impairment, having attacked the complainer with a hatchet on 7 June 2014.
 The complainer was a 30 year old male, who was apparently a stranger to the appellant. He had been coming out of a shop in Shieldhall Road at 11.30 in the morning. The appellant struck him on the chest and arm with a hatchet. The wound to the arm was 12cms in length. Over 30 hours of surgery were required to treat the arm. Skin grafts from his leg were needed, as were 50 stitches. He spent some 16 days as an in-patient.
 After the jury’s verdict, there was little said by way of mitigation, although the agent invited the sheriff to call for a Criminal Justice Social Work Report. The sheriff did not do so. He sentenced the appellant to 4 years imprisonment and added a Supervised Release Order of 12 months. Such an Order was incompetent in light of the period of incarceration and the absence of a CJSWR (Criminal Procedure (Scotland) Act 1995, s 209(1) and (2)). The sheriff made the sentence consecutive to a return order under section 16 of the Prisoners and Criminal Proceedings (Scotland) Act 1993; the number of unexpired days having been agreed by the parties at 147. The appellant had been released on licence on 1 July 2013. His licence expired on 31 October 2014. Unknown to the sheriff, that licence had been revoked by the Scottish Ministers under section 17 of the 1993 Act on 13 August 2014.
 Two points are raised in the appeal. The first is that there has been an element of double counting by reason of the sheriff imposing the section 16 order, where there had been a recall of a licence. Secondly, the SRO was incompetent, which the sheriff had readily acknowledged. When the case previously called before this court, a CJSWR was requested, with a view to determining what appropriate supervision might be required. The report provided a different account from the appellant about what had happened during the incident. That apart, it set forth the appellant’s background in Govan; the separation of his parents; his expulsion from school; and the fact that he only came to the attention of the Criminal Justice system when he was about 19. He had worked variously as a window cleaner, labourer and driver of boats. The risk of him causing harm was assessed at medium.
 The fact that there has been revocation of a released prisoner’s licence under section 17 of the 1993 Act, does not affect the competency of the court imposing a separate order under section 16 of that Act for such a period, up to the maximum permitted, as the court thinks fit (Stuart v HM Advocate 2010 SCCR 499, Lady Paton, delivering the Opinion of the Court, at para (e)). The section 17 power is protective, whereas section 16 is punitive (ibid, citing R v Sharkey  1 WLR 160, Lord Bingham at 166). It may be, of course, that the court will wish to take into account revocation of the licence, either in selecting the appropriate length of the return order or in determining the ultimate sentence for the new offence. These are matters primarily for the discretion of the court at first instance. It is sufficient to say that the return order here was a competent one. Having regard to all the circumstances, the ultimate custodial element of the sentence cannot be described as excessive. Indeed, on any view, where an accused has gone into the public street during the hours of daylight and attacked a stranger with a hatchet, causing very serious injuries, the custodial element selected by the sheriff can only be described as at the lower end of available disposals. In light of the restricted nature of the appeal, however, the court does not intend to interfere with that element.
 The court is bound to quash the SRO as incompetent. It takes note of the fact, however, that the sheriff considered that a period of post release supervision was required. That matter has been confirmed by the risk assessment contained in the CJSWR. In all the circumstances, the court will quash the entire sentence and instead impose an extended sentence, involving 2 years of supervision. The sentence will therefore be an extended one of 6 years, of which the custodial element is 4 years.