
815 P.2d 987 (1991)
The PEOPLE of the State of Colorado, Petitioner-Appellee, In the Interest of E.Z.L., a child, Appellant.
No. 90CA1204.
Colorado Court of Appeals, Div. I.
April 11, 1991.
Rehearing Denied May 16, 1991.
Certiorari Denied September 3, 1991.
Duane Woodard, Atty. Gen., Charles B. Howe, Chief Deputy Atty. Gen., Richard H. Forman, Sol. Gen., Robert M. Petrusak, Asst. Atty. Gen., Denver, for petitioner-appellee.
Douglas McKay Kerr, Denver, for appellant.
Opinion by Judge REED.
E.Z.L. appeals the trial court order denying his motion for correction of an illegal commitment to the Department of Institutions. We reverse in part and remand with directions.
As here pertinent, E.Z.L. was charged in two separate petitions in delinquency in the Denver Juvenile Court. The underlying offenses, alleged in the petitions, consisted of aggravated motor vehicle theft in 1989, and, while being held therefore in a detention facility, for the possession of contraband, assault, and criminal attempt to escape in February 1990. These offenses were committed while E.Z.L. was 17 years of age. However, he had attained the age of 18 years at the time the challenged order of commitment was entered on May 24, 1990.
Upon acceptance of E.Z.L.'s admissions that he committed the acts charged in the two petitions, the trial court adjudicated him a delinquent and committed him on May 24, 1990, to the Department of Institutions. The commitment imposed upon the *988 first petition was for a term of two years. Upon two of the offenses set forth in the second petition, the trial court likewise entered a commitment of two years and ordered that the same be served concurrently with that imposed upon the first petition. However, as to the offense of criminal attempt to escape, the trial court imposed a one-year commitment to the Department of Institutions and ordered that it run consecutive to the two-year commitment imposed simultaneously upon the first petition.
E.Z.L. does not contest the legality of the two two-year concurrent commitments. He contends, however, that the one-year consecutive commitment is illegal and that the trial court erred in denying his motion for its correction.
Citing S.G.W. v. People, 752 P.2d 86 (Colo.1988), he argues that the consecutive commitment is prohibited because it is not expressly authorized under the Colorado Children's Code, § 19-1-101, et seq., C.R.S. (1990 Cum.Supp.). We agree that the consecutive commitment is illegal, but for different reasons than those contended.
Section 19-2-703(1)(b), C.R.S. (1990 Cum. Supp.) of the Children's Code provides that the court may commit a person 18 years of age or older to the Department of Institutions if, as here, he is adjudicated a juvenile delinquent for an act committed prior to his eighteenth birthday. However, such commitment must be for a determinate period and, subject to circumstances not here present, the commitment shall not exceed a total of two years. Section 19-2-704(3), C.R.S. (1990 Cum.Supp.)
Section 18-8-208.1(2), C.R.S. (1986 Repl. Vol. 8B), of the Criminal Code, provides in pertinent part:
"If a person, while in custody or confinement and held for or charged with but not convicted of a felony, knowingly attempts to escape from said custody or confinement, he commits a class 5 felony. If the person is convicted of the felony or other crime for which he was originally in custody or confinement, the sentence imposed pursuant to this subsection (2) shall run consecutively with any sentences being served by the offender." (emphasis added)
Further, § 18-8-210.1, C.R.S. (1990 Cum. Supp.) states:
"For the purposes of this part 2, any reference to custody, confinement, charged with, held for, convicted of, a felony, misdemeanor, or petty offense shall be deemed to include a juvenile who is detained for the commission of any act which would constitute such a felony, misdemeanor, or petty offense if committed by an adult...."
The primary task of an appellate court in construing a statute is to discern the intent of the General Assembly. Words and phrases must be given effect according to their plain and ordinary meaning, and the statute should be interpreted in such a way as to give sensible effect to all its parts. People v. District Court, 713 P.2d 918 (Colo.1986).
In the event statutes conflict, effect shall be given to both, if such is possible. If not, the more specific provision shall prevail as an exception to the general rule, absent a clear legislative intent to revoke the prior specific provision. Section 2-4-205, C.R.S. (1980 Repl.Vol. 1B); Fuhrer v. Department of Motor Vehicles, 197 Colo. 325, 592 P.2d 402 (1979).
Applying those rules here, we conclude that the statutes can be construed to be in accord with each other. Section 18-8-208.1(2) is the more specific statute in this case, concerning the mandatory imposition of consecutive sentences for escape. Section 19-2-704(3) is a statute of broader scope, governing the imposition of commitments generally. Thus, the imposition of consecutive sentences found in § 18-8-208.1(2) is an exception to the general provisions found in § 19-2-704(3).
Defendant's reliance on S.G.W. v. People, supra, is misplaced. In S.G.W. the question presented was whether, under the then statutory scheme, the Colorado Children's Code authorized a juvenile court to commit a "repeat-juvenile offender" who was also a "mandatory sentence offender" to a two-year term, consecutive to a two-year *989 commitment imposed in a separate delinquency adjudication. The supreme court held that the juvenile court could not. In so holding, the S.G.W. court considered, inter alia, the effect of the predecessor to § 19-2-704(3). That statute was similar in many respects to the present statute; however, the court did not decide the issue presented here because the juvenile there had not been charged with an attempted escape. Consequently, the mandatory provisions of § 18-8-210.1 were not applicable.
We conclude that the mandatory provisions of §§ 18-8-208.1(2) and 18-8-210.1 are to be construed in pari materia with § 19-2-704(3) and mandate the imposition here of a consecutive commitment for the offense of criminal attempt to escape. However, this does not conclude our review of the sentence.
Section 18-8-208.1(2) requires a consecutive sentence to any sentences being served by the offender. Here, the trial court imposed the consecutive commitment to a commitment not then being served. This was error.
Based on the record at the time of sentencing, the juvenile was serving a commitment imposed on March 16, 1990, in an unrelated cause. This was the only commitment being served by the juvenile when he was committed for criminal attempt escape. Accordingly, the trial court was required to impose a consecutive commitment, but consecutive only to the commitment the juvenile was then serving rather than those simultaneously imposed.
The commitment imposed relating to the attempted escape is affirmed except as to that portion directing that it be served consecutive to the two-year commitment imposed. That part of the commitment is reversed, and the cause is remanded with directions that the one-year commitment be ordered served consecutive to the commitment imposed on March 16, 1990.
PIERCE and CRISWELL, JJ., concur.
