***********************************************
    The “officially released” date that appears near the be-
ginning of each opinion is the date the opinion will be pub-
lished in the Connecticut Law Journal or the date it was
released as a slip opinion. The operative date for the be-
ginning of all time periods for filing postopinion motions
and petitions for certification is the “officially released”
date appearing in the opinion.

   All opinions are subject to modification and technical
correction prior to official publication in the Connecticut
Reports and Connecticut Appellate Reports. In the event of
discrepancies between the advance release version of an
opinion and the latest version appearing in the Connecticut
Law Journal and subsequently in the Connecticut Reports
or Connecticut Appellate Reports, the latest version is to
be considered authoritative.

   The syllabus and procedural history accompanying the
opinion as it appears in the Connecticut Law Journal and
bound volumes of official reports are copyrighted by the
Secretary of the State, State of Connecticut, and may not
be reproduced and distributed without the express written
permission of the Commission on Official Legal Publica-
tions, Judicial Branch, State of Connecticut.
***********************************************
STATE OF CONNECTICUT v. FRANCIS ANDERSON
               (AC 40378)
                     Sheldon, Prescott and Pellegrino, Js.

                                    Syllabus

The defendant, who had been convicted of assault in the second degree
   and reckless endangerment in the second degree, appealed to this court
   from the trial court’s denial in part and dismissal in part of his motion
   to correct an illegal sentence, and from the dismissal of his motion to
   revise the judgment mittimus. The defendant had been in the custody
   of the Psychiatric Security Review Board and confined to a state hospital
   after previously having been found not guilty of various charges by
   reason of mental disease or defect in 2008. While confined at the hospital,
   the defendant commenced a pattern of assaulting other patients and
   hospital staff and various charges were brought against him related
   thereto. When he failed to post bond for those charges, he was trans-
   ferred to a correctional facility. He subsequently was found guilty of
   assault in the second degree and reckless endangerment in the second
   degree. Eleven months before the defendant’s release date on his 2008
   conviction, the trial court sentenced him on September 12, 2016, on the
   assault and reckless endangerment charges to a term of incarceration
   that was to run consecutively to the term of incarceration that he was
   then serving. The court remanded him to the custody of the Commis-
   sioner of Correction instead of ordering that he be returned to the state
   hospital. The defendant claimed in his motion to correct that the trial
   court lacked the authority to remand him to the custody of the Commis-
   sioner of Correction and that he, instead, should have been returned to
   the state hospital where he had been serving his 2008 sentence. The
   defendant further claimed that all time that he had spent in prison
   completing his 2008 sentence as presentence jail credit should be cred-
   ited toward the consecutive sentence on the assault and reckless endan-
   germent charges. He further claimed that the judgment mittimus should
   be revised to implement the court’s order that he receive all pretrial
   credits to which he was entitled. The court denied the defendant’s
   motion to correct, concluding that it was not appropriate to allow the
   defendant to remain at the state hospital as a consequence of his prior
   insanity acquittal when he had seriously injured a staff member and
   endangered others, and that the defendant had not proved that he suf-
   fered from a mental disease or defect at the time he committed the
   crimes that led to his conviction on the assault and reckless endanger-
   ment charges. The court also dismissed the defendant’s request for
   pretrial jail credit for lack of jurisdiction, ruling that it did not constitute
   a viable claim for relief under the applicable rule of practice (§ 43-22).
   Held that the trial court properly denied in part and dismissed in part
   the defendant’s motion to correct an illegal sentence, and dismissed his
   related motion to revise the judgment mittimus: even if the trial court
   should have returned the defendant to the state hospital instead of
   remanding him to prison, the defendant already had received full credit
   toward his 2008 sentence for the period in which he was incarcerated
   from September 12, 2016, to August 5, 2017, the release date for his
   2008 conviction, and because he was not entitled to jail time credit for
   the same period of incarceration toward the service of two separate
   sentences that did not run concurrent to each other, the defendant’s
   claim that the eleven months at issue should be credited a second time
   therefore failed; moreover, the defendant was not entitled to presentence
   credit for all time he had spent incarcerated in lieu of bail in this case
   or to a revision of the judgment mittimus to implement the court’s order
   that he receive all pretrial credits to which he was entitled, as the trial
   court’s jurisdiction under § 43-22 applies only to claims that arise from
   the sentencing proceeding, the defendant’s claim concerned the legality
   of his sentence as calculated by Department of Correction and did not
   arise from the sentencing proceeding, and, therefore, the trial court
   properly dismissed the claim for lack of subject matter jurisdiction.
      Argued October 24, 2018—officially released January 29, 2019
                     Procedural History

   Substitute information charging the defendant with
the crime of assault in the second degree and with four
counts of the crime of reckless endangerment in the
second degree, brought to the Superior Court in the
judicial district of Middlesex and tried to the court,
Vitale, J.; judgment of guilty, from which the defendant
appealed to this court, which affirmed the judgment of
the trial court; thereafter, the Supreme Court denied
the defendant’s petition for certification to appeal; sub-
sequently, the court, Vitale, J., denied in part and dis-
missed in part the defendant’s motion to correct an
illegal sentence, and the defendant appealed to this
court; thereafter, the court, Vitale, J., dismissed the
defendant’s motion to revise or correct the judgment
mittimus, and the defendant filed an amended
appeal. Affirmed.
  Monte P. Radler, public defender, for the appellant
(defendant).
  Nancy L. Walker, assistant state’s attorney, with
whom, on the brief, were Peter A. McShane, former
state’s attorney, and Jeffrey Doskos, senior assistant
state’s attorney, for the appellee (state).
                         Opinion

   SHELDON, J. The defendant, Francis Anderson,
appeals following the trial court’s denial in part and
dismissal in part of his motion to correct an illegal
sentence, and from the dismissal of his related motion
for a new mittimus to implement the court’s order on
the date it imposed the challenged sentence that he
receive all pretrial jail credits to which he is legally
entitled toward that sentence. The sentence at issue is
a term of incarceration, which the court ordered that
the defendant serve consecutively to an unexpired term
of incarceration that he was serving at the time of the
offenses at issue at the Whiting Forensic Division of
Connecticut Valley Hospital (Whiting), to which he had
been committed to receive psychiatric care and treat-
ment following his acquittal by reason of mental disease
or defect of a third set of unrelated charges. The defen-
dant does not challenge the length of his consecutive
sentence. Instead, he claims that that sentence was
imposed on him in an illegal manner because the court,
after pronouncing that sentence, ordered that he be
transferred at once to a state correctional facility to
complete his earlier sentence and receive such further
psychiatric care and treatment, as necessary, rather
than returned to Whiting for those purposes. Claiming
that the court had no jurisdiction to enter any order
with respect to his earlier sentence, which allegedly
would have been completed in a hospital setting rather
than a prison had the court not ordered his immediate
imprisonment after sentencing, the defendant seeks to
correct the court’s alleged error by crediting all time
that he improperly spent in prison completing his earlier
sentence as presentence jail credit toward his consecu-
tive sentence, thereby advancing his release date on
that sentence by approximately eleven months. The trial
court disagreed, denying that portion of the defendant’s
motion to correct, in which he made the foregoing argu-
ment, and dismissing his parallel claim that the pretrial
jail time credit to which he allegedly was entitled had
not properly been credited toward his sentence. On
this appeal, we affirm all aspects of the trial court’s
challenged rulings.
  The following procedural history is relevant to the
defendant’s claims on appeal. ‘‘On January 10, 2008, the
[defendant] entered guilty pleas, pursuant to the Alford
doctrine,1 to three counts of burglary . . . and one
count of larceny . . . and admitted a violation of pro-
bation. The state entered a nolle prosequi as to the
remaining charges. On March 6, 2008, the trial court
sentenced the [defendant] to a total effective sentence
of five years imprisonment and three years of special
parole. The [defendant] did not file a direct appeal.’’
(Footnote in original; internal quotation marks omit-
ted.) Anderson v. Commissioner of Correction, 308
Conn. 456, 458, 64 A.3d 325 (2013). On May 6, 2011, the
defendant received a consecutive sentence of five years
imprisonment on additional charges. The release date
for that sentence, to which we have referred as ‘‘the
2008 sentence,’’ was calculated by the Department of
Correction (department) to be August 5, 2017. ‘‘Follow-
ing an incident that occurred on or about July 6, 2012,
the defendant was charged with assault of a correction
officer, breach of the peace and failure to submit to
fingerprinting. . . . The defendant subsequently was
found not guilty of these charges by reason of mental
disease or defect.2 On August 15, 2013, the trial court,
McMahon, J., committed the defendant to the custody
of the Commissioner of Mental Health and Addiction
Services. The defendant was transferred to . . . Whit-
ing . . . where he received a psychiatric evaluation
pursuant to General Statutes § 17a-582.3 The October
23, 2013 report resulting from that evaluation recom-
mended that the defendant be returned to prison. On
November 18, 2013, Judge McMahon disagreed with
the hospital’s recommendation and, consistent with the
contrary recommendation of an independent evaluator
sought by the defendant pursuant to § 17a-582 (c),4
ordered that the defendant be committed to the custody
of the Psychiatric Security Review Board (board) and
confined at the hospital for a period not exceeding
ten years.5 On February 7, 2014, the board held the
defendant’s initial commitment hearing, after which it
concluded that he had a psychiatric illness that required
care, custody and treatment. It concluded further that
he had a psychiatric disability to the extent that his
discharge would constitute a danger to himself or oth-
ers, and that he required confinement in a maximum
security setting. Accordingly, the board ordered that
the defendant remain confined at the hospital under
maximum security conditions.6
   ‘‘Upon arriving at the hospital, the defendant alleg-
edly commenced a pattern of assaulting other patients
and hospital staff. As a result of his conduct on various
dates from October, 2013, through February, 2014, he
was charged with several misdemeanors.7 Thereafter,
in April, 2014, he was charged with, inter alia, two
counts of assault of health care personnel, a class C
felony. See General Statutes § 53a-167c. In connection
with all but one of these charges, the defendant was
released on a promise to appear and ordered returned
to Whiting.8 Also, in April, 2014, the state filed a motion
for bond review, in which it requested that the trial
court modify the defendant’s existing conditions of
release and impose an appropriate monetary bond. The
defendant filed an opposition to the state’s motion and
an accompanying memorandum of law, arguing therein
that the court lacked the authority to impose a monetary
bond under the circumstances of this case. The parties
attached exhibits to these filings, including the hospi-
tal’s October 23, 2013 report concerning its psychiatric
evaluation of the defendant, several reports from the
defendant’s independent psychiatric evaluator, the tran-
script of the commitment hearing before the board and
the board’s report recommending that the defendant
be confined in a maximum security setting.
   ‘‘On June 18, 2014, the trial court, Gold, J. . . . con-
cluded that, although the defendant was a confined
insanity acquittee, the court retained the authority, con-
ferred by General Statutes § 54-64a . . . and Practice
Book § 38-4 . . . to set a monetary bond upon his com-
mission of new offenses in the hospital setting, particu-
larly for the purpose of ensuring the safety of other
persons. The court then scheduled an evidentiary hear-
ing on the state’s motion for bond review to consider
whether the defendant’s existing conditions of release
should be modified. Before that hearing could occur,
however, the defendant was charged with another fel-
ony count of assault of health care personnel, as well
as three additional misdemeanors. On August 25, 2014,
at the defendant’s arraignment on those charges, the
court set a bond in the amount of $100,000, cash or
surety. Because the defendant was unable to post that
bond, he was transferred to the custody of the Commis-
sioner of Correction. . . . See General Statutes § 54-
64a (d). The court directed that the mittimus reflect
that the defendant required mental health treatment
and that he should be housed and monitored in a way
to ensure, to the extent possible, the safety of other
inmates and correction personnel.’’ (Footnote added;
footnotes omitted; internal quotation marks omitted.)
State v. Anderson, 319 Conn. 288, 292–97, 127 A.3d
100 (2015).9
   The defendant appealed to our Supreme Court, claim-
ing ‘‘that the trial court’s order setting a monetary bond
as a condition of release and, because he was unable
to post that bond, his subsequent transfer to the custody
of the Commissioner of Correction were in violation of
his constitutional rights, namely, his right to bail under
the state constitution and his right to procedural due
process under the federal constitution.’’ Id., 299. The
court rejected each of the defendant’s claims, and fur-
ther held ‘‘that the defendant’s remedy, if he believes
that the mental health treatment he is receiving while
in the custody of the Commissioner of Correction is
constitutionally inadequate, is through an expedited
petition for a writ of habeas corpus challenging the
conditions of his confinement.’’ Id.
   As a result of the incidents that occurred while he
was at Whiting, the defendant was convicted, after a
court trial, of one count of assault in the second degree
in violation of General Statutes § 53a-60 (a) (3) and four
counts of reckless endangerment in the second degree
in violation of General Statutes § 53a-64 (a). At the
defendant’s sentencing hearing, the prosecutor argued
that sending the defendant back to Whiting was not a
viable option due to his repeated ‘‘violent propensities
toward staff, patients and inmates . . . .’’ Before artic-
ulating the defendant’s position at the sentencing hear-
ing, defense counsel called Dr. Madelon V. Baranoski,
a forensic psychologist who met with and evaluated
the defendant, to testify. Baranoski testified, inter alia,
that Whiting was not a suitable placement for the defen-
dant. In his remarks to the court, defense counsel
explained the unique circumstances of the defendant:
‘‘He’s a convicted criminal defendant awaiting sentenc-
ing . . . . He’s [an] involuntarily committed insanity
acquittee under the [jurisdiction of the board]. He’s a
sentenced prisoner with [a] concurrently running unex-
pired sentence and also a pretrial detainee under multi-
ple docket numbers under which he remains
incarcerated pursuant to a bond he was unable to post.’’
Defense counsel argued that it was inappropriate to
punish an insanity acquittee by incarceration, but
acknowledged that ‘‘the only practical options [for the
defendant] are available through the correction system
. . . .’’ He explained that ‘‘he can’t go back to Whiting
untreated, and he shouldn’t go back to Whiting,
according to Dr. Baranoski, at all . . . .’’
   The court posited: ‘‘The question now is the nature
of an appropriate sentence and more practically where
the sentence will be served once it is imposed under
the unique circumstances presented, and to ensure that
[the defendant] receives the opportunity for appropriate
treatment.’’ The court then explained: ‘‘The . . . cir-
cumstances [of this case] are unique in that the defen-
dant is presently now serving the aforementioned ten
year sentence while also simultaneously an insanity
acquittee, again, to speak colloquially, on different
charges, and is now facing sentencing on subsequent
crimes he committed at Whiting for which this court has
found him criminally responsible. Thus, the defendant’s
sentencing presents the preliminary questions of
whether and how the defendant can be moved to the
[department’s] jurisdiction for . . . these subsequent
criminal offenses when he’s still under technically the
jurisdiction of the board although simultaneously also
serving a criminal sentence in a different matter.’’
  The court further explained: ‘‘The court has consid-
ered the sentencing goals as well as all the information
before it, including balancing the defendant’s rights to
mental health treatment if needed with that of the rights
of the victims under . . . the Connecticut constitution
to be protected from the accused. . . .
  ‘‘[T]he court intends to impose a sentence and order
that the defendant be immediately transferred to the
custody of the [department]. The court believes this
action to be appropriate based on the serious nature
of these allegations and is a consequence of the defen-
dant’s seemingly unabated proclivity to assault or
threaten staff in a treatment setting or in corrections.
  ‘‘In the court’s view, it defies logic to conclude that
it would be appropriate to allow the defendant to remain
at Whiting as a consequence of a prior insanity acquittal
despite the fact that he thereafter seriously injured a
staff member and endangered others. And this court
has found that at the time of the assault that is before
this court, the defendant did not prove he suffered from
a mental disease or defect, as required by law. To con-
clude otherwise would mean the defendant would be
free to commit new crimes, confident he would just be
returned to the same facility among potential victims
who are both staff and other patients. The victims have
a constitutional right to be protected from the defen-
dant.’’ The court imposed a sentence of seven years
incarceration, suspended after five and one-half years,
and two years probation to be served consecutively to
the 2008 sentence that he was then serving. The court
thereupon ordered that the defendant be remanded to
the custody of the Commissioner of Correction instead
of returned to Whiting.
   On January 20, 2017, the defendant filed a motion to
correct ‘‘an illegal disposition and/or sentence imposed
in an illegal manner.’’ In his motion, the defendant
argued that the court did not have the authority, when
sentencing him on September 12, 2016, to remand him
to the custody of the Commissioner of Correction. He
claimed that because the sentence that was imposed
on September 12, 2016, was to be served consecutively
to the sentence that he was then serving, which was
the 2008 sentence, he should have been returned to
Whiting to continue serving the 2008 sentence, which
is where he had been serving the 2008 sentence until
he was transferred to the department as a pretrial
detainee. He argued that because he had not been
restored to sanity and was still hospitalized as an insan-
ity acquittee at the time of his September 12, 2016 sen-
tencing, he was entitled to be treated for his mental
disease or defect instead of being punished by incarcer-
ation. He also asked the court to award him credit
toward his consecutive sentence for all time he had
spent in jail as a pretrial detainee in this case, which
he inadvertently neglected to request when he was sen-
tenced. The state did not file a written objection to the
defendant’s motion.
  At the hearing on the motion to correct, defense coun-
sel explained that he was ‘‘not asking the [reviewing
court] to review the sentence itself. This motion is
directed to the orders of the court as far as imposing
the sentence and the impact of the court’s order on
custody of [the defendant]. . . . I’m proceeding specif-
ically under the subsection [of Practice Book § 43-22],
disposition imposed in an illegal manner.’’ The defen-
dant argued that the illegality of the sentence was the
court’s ‘‘imposition of the sentence consecutive to a
sentence which did not expire until August of 2017, and
then simultaneously ordering [the defendant] into [the
department’s] custody as a sentenced prisoner under
authority of that sentence that was running that had
nothing to do with the subject matter of the trial. Essen-
tially, Your Honor ordered [the defendant] to be taken
directly into [the department’s] custody upon sentenc-
ing to recommence serving an older sentence over
which Your Honor, as trial judge, had no jurisdiction
or authority . . . .’’10 The defendant also argued that
he was entitled to credit toward his September 12, 2016
sentence for all the time he had spent in the custody of
the Commissioner of Correction as a pretrial detainee.
  In response, the state argued that the defendant’s
motion should be denied. The state contended that the
court properly imposed the September 12, 2016, sen-
tence to run consecutively to the defendant’s 2008 sen-
tence. The state further argued that the court properly
declined to remand the defendant to Whiting on Septem-
ber 12, 2016 as it was not a safe environment for the
defendant or the staff or other patients receiving treat-
ment there. The state also argued that the court did not
have jurisdiction pursuant to Practice Book § 43-22 over
the defendant’s claim for pretrial confinement credit.
  The court orally denied the defendant’s motion to
correct, citing the rationale on which it relied in impos-
ing the September 12, 2016 sentence. The court also
dismissed the defendant’s request for pretrial jail credit
for lack of jurisdiction because that request did not
constitute a viable claim for relief under Practice Book
§ 43-22. This appeal followed.
   We begin by setting forth the following relevant legal
principles. ‘‘The Superior Court is a constitutional court
of general jurisdiction. In the absence of statutory or
constitutional provisions, the limits of its jurisdiction
are delineated by the common law. . . . It is well estab-
lished that under the common law a trial court has
the discretionary power to modify or vacate a criminal
judgment before the sentence has been executed. . . .
This is so because the court loses jurisdiction over the
case when the defendant is committed to the custody
of the commissioner of correction and begins serving
the sentence. . . . Because it is well established that
the jurisdiction of the trial court terminates once a
defendant has been sentenced, a trial court may no
longer take any action affecting a defendant’s sentence
unless it expressly has been authorized to act. . . .
[Practice Book] § 43-22 embodies a common-law excep-
tion that permits the trial court to correct an illegal
sentence or other illegal disposition. . . . Thus, if the
defendant cannot demonstrate that his motion to cor-
rect falls within the purview of § 43-22, the court lacks
jurisdiction to entertain it. . . . [I]n order for the court
to have jurisdiction over a motion to correct an illegal
sentence after the sentence has been executed, the sen-
tencing proceeding [itself] . . . must be the subject of
the attack. . . .
  ‘‘[A]n illegal sentence is essentially one [that] either
exceeds the relevant statutory maximum limits, violates
a defendant’s right against double jeopardy, is ambigu-
ous, or is internally contradictory. By contrast . . .
[s]entences imposed in an illegal manner have been
defined as being within the relevant statutory limits but
. . . imposed in a way [that] violates [a] defendant’s
right . . . to be addressed personally at sentencing and
to speak in mitigation of punishment . . . or his right
to be sentenced by a judge relying on accurate informa-
tion or considerations solely in the record, or his right
that the government keep its plea agreement promises
. . . . These definitions are not exhaustive, however,
and the parameters of an invalid sentence will evolve
. . . as additional rights and procedures affecting sen-
tencing are subsequently recognized under state and
federal law. . . .
   ‘‘Recently, our Supreme Court explained, in
addressing the trial court’s dismissal on jurisdictional
grounds of a motion to correct an illegal sentence that
[t]he subject matter jurisdiction requirement may not
be waived by any party, and also may be raised by a
party, or by the court sua sponte, at any stage of the
proceedings, including on appeal. . . . At issue is
whether the defendant has raised a colorable claim
within the scope of Practice Book § 43-22 that would,
if the merits of the claim were reached and decided in
the defendant’s favor, require correction of a sentence.
. . . In the absence of a colorable claim requiring cor-
rection, the trial court has no jurisdiction to modify
the sentence.’’ (Citations omitted; emphasis omitted;
internal quotation marks omitted.) State v. Jason B.,
176 Conn. App. 236, 243–44, 170 A.3d 139 (2017).
   ‘‘We review the [trial] court’s denial of [a] defendant’s
motion to correct [an illegal] sentence under the abuse
of discretion standard of review. . . . In reviewing
claims that the trial court abused its discretion, great
weight is given to the trial court’s decision and every
reasonable presumption is given in favor of its correct-
ness. . . . We will reverse the trial court’s ruling only
if it could not reasonably conclude as it did.’’ (Internal
quotation marks omitted.) State v. Logan, 160 Conn.
App. 282, 287, 125 A.3d 581 (2015), cert. denied, 321
Conn. 906, 135 A.3d 279 (2016). ‘‘Our determination of
whether a motion to correct falls within the scope of
Practice Book § 43-22 is a question of law and, thus, our
review is plenary.’’ (Internal quotation marks omitted.)
State v. Lugojanu, 184 Conn. App. 576, 580, 195 A.3d
1191 (2018).
  The defendant first claims that his 2016 sentence
was imposed in an illegal manner because the court
improperly ordered that he be immediately remanded
to the custody of the Commissioner of Correction and
incarcerated, instead of remanded to the custody of
the board and returned to Whiting, where he had been
serving his 2008 sentence.11 He claims: ‘‘By having
imposed a consecutive sentence to an unexpired 2008
sentence, and subsequently ordering immediate impris-
onment pursuant to the 2008 sentence, the trial court
effectively modified the term of a valid judgment
imposed by an earlier court without the legal authority
to do so.’’ The defendant thus is arguing that he should
have been sent back to Whiting on September 12, 2016
to finish serving his 2008 sentence, which has now
expired. By way of relief, the defendant asks this court
to ‘‘remand [this case] with instructions to the trial
court to impose its original sentence for the convictions
in this case retroactive to September 12, 2016.’’ The
defendant explains: ‘‘The specific sentencing relief that
[he] is seeking from this particular claim is retroactivity
of the sentence imposed by [the] trial court from August
5, 2017, the estimated release date of the 2008 sentence,
to its imposition date of September 12, 2016, an advance
of [his] estimated release date from this sentence by
nearly eleven months.’’
  The defendant’s claim is misplaced because, even if
we assume, arguendo, that the trial court should have
returned him to Whiting instead of remanding him to
prison, he has already received full credit toward his
2008 sentence for the period in which he was incarcer-
ated from September 12, 2016, to August 5, 2017. It is
axiomatic that a defendant is not entitled to credit for
the same period of incarceration, toward the service
of two separate sentences, unless the court orders that
such sentences are to be served concurrently.12 The
defendant’s claim that the eleven months here at issue
should be credited a second time therefore must fail.
   The defendant’s claim that the court erred in dismiss-
ing that portion of his motion to correct an illegal sen-
tence in which he asserted that he was entitled to
presentence credit for all time he had spent incarcer-
ated in lieu of bail in this case, and his related request
to revise his mittimus to implement the court’s order
that he receive all pretrial credits to which he was
entitled, are likewise unavailing. As previously noted,
the trial court’s jurisdiction under Practice Book § 43-
22 is narrow, applying only to limited claims that arise
from the sentencing proceeding itself. See Crawford v.
Commissioner of Correction, 294 Conn. 165, 199 n.21,
982 A.2d 620 (2009) (‘‘[i]n order for the court to have
jurisdiction over a motion to correct an illegal sentence
[under Practice Book § 43-22] after the sentence has
been executed, the sentencing proceeding . . . must
be the subject of the attack’’ [internal quotation marks
omitted]). The defendant’s claim does not arise from
the sentencing proceeding or, in fact, from any action
taken by the trial court, but concerns, as he put it in
his brief to this court, ‘‘the legality of his sentence as
calculated by the department . . . .’’ Because the
defendant’s claim does not fall within the narrow ambit
of § 43-22, the court properly dismissed it for lack of
subject matter jurisdiction. See State v. Montanez, 149
Conn. App. 32, 41, 88 A.3d 575, cert. denied, 311 Conn.
955, 97 A.3d 985 (2014).
      The judgment is affirmed.
      In this opinion the other judges concurred.
  1
     See North Carolina v. Alford, 400 U.S. 25, 91 S. Ct. 160, 27 L. Ed. 2d
162 (1970).
   2
     General Statutes § 53a-13 provides in relevant part: ‘‘(a) In any prosecu-
tion for an offense, it shall be an affirmative defense that the defendant, at
the time he committed the proscribed act or acts, lacked substantial capacity,
as a result of mental disease or defect, either to appreciate the wrongfulness
of his conduct or to control his conduct within the requirements of the
law. . . .’’
   3
     General Statutes § 17a-582 provides in relevant part: ‘‘(a) When any
person charged with an offense is found not guilty by reason of mental
disease or defect pursuant to section 53a-13, the court shall order such
acquittee committed to the custody of the Commissioner of Mental Health
and Addiction Services who shall cause such acquittee to be confined,
pending an order of the court pursuant to subsection (e) of this section, in
any of the state hospitals for psychiatric disabilities . . . .
   ‘‘(b) Not later than sixty days after the order of commitment pursuant to
subsection (a) of this section, the superintendent of such hospital . . . shall
cause the acquittee to be examined and file a report of the examination
with the court, and shall send a copy thereof to the state’s attorney and
counsel for the acquittee, setting forth the superintendent’s . . . findings
and conclusions as to whether the acquittee is a person who should be
discharged. . . .’’
   4
     Pursuant to § 17a-582 (c), following receipt of the hospital’s report,
counsel for the acquittee may seek a separate examination of the acquittee
by a psychologist or psychiatrist of the acquittee’s choice, and any resulting
report from such examination must be filed with the trial court within thirty
days of the filing of the hospital’s report.
   5
     Pursuant to § 17a-582 (d), the trial court, after receiving the results of
a hospital evaluation conducted pursuant to § 17a-582 (b) and, if the acquittee
requests it, a separate evaluation conducted by a psychologist or psychiatrist
of the acquittee’s choice pursuant to § 17a-582 (c), must conduct a hearing
to determine whether the court may find that the acquittee should be either
discharged, conditionally released or confined. See General Statutes § 17a-
582 (e) (1) and (2). ‘‘If the court finds that the acquittee is a person who
should be confined . . . the court shall order the acquittee committed to
the jurisdiction of the board and . . . confined in a hospital for psychiatric
disabilities . . . for custody, care and treatment pending a hearing before
the board pursuant to section 17a-583; provided (A) the court shall fix a
maximum term of commitment, not to exceed the maximum sentence that
could have been imposed if the acquittee had been convicted of the offense
. . . .’’ General Statutes § 17a-582 (e) (1).
   6
     Pursuant to § 17a-583 (a), ‘‘[t]he board shall conduct a hearing to review
the status of [an insanity] acquittee within ninety days of an order committing
the acquittee to the jurisdiction of the board,’’ and, pursuant to § 17a-583
(b), at that hearing, ‘‘the board shall make a finding and act pursuant to
section 17a-584.’’ General Statutes § 17a-583 (b).
   General Statutes § 17a-584 directs the board, at the hearing held pursuant
to § 17a-583 (a), to ‘‘make a finding as to the mental condition of the acquittee
. . . considering that its primary concern is the protection of society . . . .’’
It further authorizes the board to find that the acquittee either should be
discharged, conditionally released or confined. See General Statutes § 17a-
584 (1) through (3). ‘‘If the board finds that the acquittee is a person who
should be confined, the board shall order the person confined in a hospital
for psychiatric disabilities . . . for custody, care and treatment.’’ General
Statutes § 17a-584 (3).
   General Statutes § 17a-599 provides in relevant part that, ‘‘[a]t any time
the court or the board determines that the acquittee is a person who should
be confined, it shall make a further determination of whether the acquittee
is so violent as to require confinement under conditions of maximum secu-
rity. . . .’’ Pursuant to General Statutes § 17a-561, ‘‘[t]he Whiting Forensic
Division of the Connecticut Valley Hospital shall exist for the care and
treatment of [inter alia] (1) patients with psychiatric disabilities, confined
in facilities under the control of the Department of Mental Health and
Addiction Services, who require care and treatment under maximum security
conditions . . . .’’
   7
     ‘‘The record indicates that, as a result of incidents occurring on five
separate dates, the defendant was charged with a total of eleven misdemean-
ors, including one count of unlawful restraint in the second degree, three
counts of assault in the third degree, two counts of threatening in the second
degree, one count of criminal mischief in the third degree, three counts of
disorderly conduct and one count of breach of the peace in the second
degree.
   ‘‘Moreover, the hospital’s October 23, 2013 report indicates that, between
August 24, 2013, and October 1, 2013, while the defendant was being evalu-
ated by the hospital, he engaged in an additional five unprovoked physical
altercations with other patients, as well as other verbal altercations with
both patients and hospital staff. None of these incidents resulted in any
criminal charges against the defendant.’’ State v. Anderson, 319 Conn. 288,
294–95 n.11, 127 A.3d 100 (2015).
   8
     ‘‘As to the charge of threatening in the second degree, the trial court,
Gold, J., imposed a $1000 nonsurety bond.’’ State v. Anderson, 319 Conn.
288, 295 n.12, A.3d 100 (2015).
   9
     ‘‘At a subsequent hearing to address the defendant’s motion for stay of
the trial court’s order setting a monetary bond pending disposition of this
appeal . . . the court elaborated on its reasons for that order. It reiterated
its belief that it ‘retain[ed] the inherent authority to set bond and to establish
conditions of release, including financial conditions, even as to insanity
acquittees who are alleged to have committed new crimes during their
period of insanity commitment.’ The court reasoned further that a rule to
the contrary ‘would effectively deprive the court of its right—in fact, its
obligation—to set conditions of release that are necessary to ensure that
the safety of other persons will not be endangered.’ Moreover, according
to the court, such a rule ‘would mean that an insanity acquittee, regardless
of the frequency and seriousness of his . . . new crimes committed during
the commitment period, would be free to commit those crimes, confident
that he would be ultimately returned to the same facility to be placed, again,
among the same staff and same patients that [he allegedly] victimized in
the first instance.’ The court observed that the defendant allegedly commit-
ted seven assaults on seven separate people at seven different times.
   ‘‘The trial court further explained that, as authorized by Practice Book
§ 38-4 (b), it had considered the defendant’s history of violence and the risk
posed to the physical safety of the staff and other patients at the hospital,
and had concluded that financial conditions of release were necessary to
ensure their safety. Moreover, the court indicated that it had considered
the rights of victims afforded by the state constitution, particularly their
right to be protected from an accused. . . . Additionally, the court reasoned
that, even if the defendant had a right to psychiatric treatment, it was not
an unqualified and inalienable right to a certain type of treatment, and the
nature of the treatment afforded to him had to be determined with reference
to the management issues that he presented, with his interests weighed
against the interests of other patients who also were entitled to treatment.
Finally, the court noted that, pursuant to its order, the defendant was to
receive psychiatric treatment while in the custody of the Commissioner of
Correction, and correction officials remained free to consult with the hospi-
tal and the board regarding that treatment.’’ State v. Anderson, supra, 319
Conn. 297–99.
   10
      At the hearing on the motion to correct, the prosecutor explained that
the defendant had not been only an insanity acquittee on September 12,
2016. He also was a sentenced inmate on the 2008 sentence, and that is the
sentence to which the court in this case ordered the defendant to serve his
sentence consecutively. The prosecutor explained: ‘‘I think what makes this
case even more unique than some of the cases that [defense counsel] has
cited is that the defendant was serving a [sentence in the custody of the
Commissioner of Correction] concurrently with a [commitment to the board
as a result of previously having been found not guilty by reason of mental
disease or defect]. If he was only [an acquittee as a result of having been
found not guilty by reason of mental disease or defect], and the court
sentenced him to a term of incarceration consecutive to that, then I would
agree with [defense counsel]. I don’t necessarily think the court could do
that; it would have to be stayed, much like the other cases have indicated.
The court sentenced him to a period of incarceration consecutive to the
. . . sentence of incarceration [in the custody of the Commissioner of Cor-
rection], and I had the same questions in mind that the court has asked
[defense counsel]: where should he serve his sentence?’’
   11
      The defendant does not challenge the trial court’s authority to impose
his 2016 sentence, or the sentence itself.
   12
      See General Statutes § 53a-8 (b), which provides in relevant part: ‘‘Where
a person is under more than one definite sentence, the sentences shall be
calculated as follows: (1) If the sentences run concurrently, the terms merge
in and are satisfied by discharge of the term which has the longest term to
run; (2) if the sentences run consecutively, the terms are added to arrive
at an aggregate term and are satisfied by discharge of such aggregate term.’’
   See also General Statutes § 18-98d (a) (1), which provides in relevant
part: ‘‘Any person who is confined to a community correctional center or
a correctional institution for an offense committed on or after July 1, 1981,
under a mittimus or because such person is unable to obtain bail or is
denied bail shall, if subsequently imprisoned, earn a reduction of such
person’s sentence equal to the number of days which such person spent in
such facility from the time such person was placed in presentence confine-
ment to the time such person began serving the term of imprisonment
imposed; provided (A) each day of presentence confinement shall be counted
only once for the purpose of reducing all sentences imposed after such
presentence confinement . . . .’’ (Emphasis added.)
