
276 Kan. 830 (2003)
80 P.3d 361
STATE OF KANSAS, Appellant,
v.
ISIDRO PEREZ-MORAN, Appellee.
No. 89,021.
Supreme Court of Kansas.
Opinion filed December 12, 2003.
Franklin T. Bruce, assistant district attorney, argued the cause, and Keith E. Schroeder, district attorney, and Phill Kline, attorney general, were with him on the briefs for appellant.
*831 Sam S. Kepfield, of Legal Services for Prisoners, Inc., of Hutchinson, argued the cause, and Cheryl I. Allen, also of Legal Services for Prisoners, Inc., was with him on the brief for appellee.
The opinion of the court was delivered by
DAVIS, J.:
Isidro Perez-Moran, an inmate at the Kansas State Correctional Prison, was convicted of two counts of attempted battery against a law enforcement officer pursuant to K.S.A. 2002 Supp. 21-3413(a)(2). On the defendant's motion, the trial court excluded two prior person felonies from his criminal history because the prior convictions were necessary to establish that he was in the custody of the Secretary of Corrections. The Court of Appeals reversed, holding that the defendant's previous convictions were not elements of the present charges and should be included in his personal criminal history. We granted the defendant's petition for review and affirm the Court of Appeals' determination that his prior felony convictions are not excluded from his personal criminal history under K.S.A. 21-4710(d)(11).
While incarcerated for the crimes of aggravated sexual battery, K.S.A. 21-3518, and aggravated burglary, K.S.A. 21-3716, the defendant bit one officer and broke the officer's eyeglasses and spit blood in the face of another officer. He pleaded guilty to two counts of attempted battery against a law enforcement officer in violation of K.S.A. 2002 Supp. 21-3413(a)(2).
The presentence investigation report revealed that the defendant's criminal history score was "B" based on the two person felonies for which he was incarcerated and seven misdemeanors. Prior to sentencing, the defendant challenged his criminal history score, arguing that his prior felony convictions should be excluded under K.S.A. 21-4710(d)(11), which provides:
"(11) Prior convictions of any crime shall not be counted in determining the criminal history category if they enhance the severity level or applicable penalties, elevate the classification from misdemeanor to felony, or are elements of the present crime of conviction. Except as otherwise provided, all other prior convictions will be considered and scored."
The defendant argued successfully before the district court that his prior felony convictions were elements of the crime charged *832 because such felonies were necessary to establish that the defendant was in the custody of the Secretary of Corrections. The district court did not address the defendant's second contention that his prior felony convictions enhanced the penalties of his present crimes by elevating them from misdemeanors to felonies.
In reversing the district court on appeal, the Court of Appeals reasoned:
"The case upon which appellee primarily relies, and upon which the trial court appears to have based its decision, is State v. Taylor, 262 Kan. 471, 939 P.2d 904 (1997). In Taylor, the defendant was charged with aggravated escape from custody under K.S.A. 21-3810(a). The Taylor court held that all charges listed in the information for the new crime used to fulfill the element of `in lawful custody' could not be used to enhance a defendant's criminal history pursuant to K.S.A. 21-4710(d)(11), but that all other crimes could, and should, be used to compute the criminal history score under that same statute. 262 Kan. at 479-80.
"There is a significant difference which distinguishes this case from Taylor. Aggravated escape requires that a defendant be `in lawful custody upon a charge or conviction of a felony.' (Emphasis added.) K.S.A. 2002 Supp. 21-3810(a); 262 Kan. at 479. Battery or attempted battery of a law enforcement officer requires that the defendant be `in custody of the secretary of corrections' at the time of commission of the crime. K.S.A. 2002 Supp. 21-3413(a)(2).
"`"In Kansas all crimes are statutory and the elements necessary to constitute a crime must be gathered wholly from the statute."' State v. Smith, 245 Kan. 381, 396, 781 P.2d 666 (1989). Aggravated escape expressly requires a `charge or conviction' of a felony; battery of a law enforcement officer does not. The requirement that one be `in custody' to be guilty of battery on a law enforcement officer appears to be meant to establish the status of the perpetrator, i.e., to distinguish between inmates, who are covered under the statute, and visitors, administrators, or other guards, who are not.
"If proof of the crime of conviction were required, it would necessarily mean that juries would hear evidence of prior crimes since at least one would be needed to prove an element of the charged crime.
"To provide proof of being `in custody,' testimony of a warden or the Secretary of Corrections as to the status of a defendant on a given day would probably suffice. Proving custody for aggravated escape would apparently require production of a charging document or journal entry of conviction. Since criminal elements may only be derived from the statute, it appears to defy the plain language of K.S.A. 2002 Supp. 21-3413(a)(2) to require proof of a conviction. While it may be inherent that only felons may be `in custody,' the legislature has not expressly established proof of conviction as an element of the crime of battery against a law enforcement officer as it has for aggravated escape." State v. Perez-Moran, 31 Kan. App. 2d 328, 329-30, 64 P.3d 463 (2003).

*833 Inclusion of prior felony offenses under the provisions of K.S.A. 21-4710(d)(11)
Interpretation of the Kansas Sentencing Guidelines Act (KSGA) is a question of law over which the appellate court's scope of review is unlimited. State v. Davis, 275 Kan. 107, 124, 61 P.3d 701 (2003). The sentencing guidelines provide that all prior convictions are to be considered in a defendant's criminal history score unless otherwise excluded. Prior convictions which "enhance the severity level or applicable penalties, elevate the classification from misdemeanor to felony, or are elements of the present crime of conviction" are excluded. K.S.A. 21-4710(d)(11).
The defendant argues the Court of Appeals erred in finding that his two prior felony convictions should be used in calculating his criminal history score under K.S.A. 21-4710(d)(11). He reasons that the convictions were an element of the crime of battery against a law enforcement officer, that they enhanced the severity level and the applicable penalties, and that they elevated the classification of the crime from a misdemeanor to a felony.
K.S.A. 2002 Supp. 21-3413(a)(2) defines attempted battery against a law enforcement officer as battery "committed against a state correctional officer or employee by a person in custody of the secretary of corrections, while such officer or employee is engaged in the performance of such officer's duty." (Emphasis added.) Relevant to this case, PIK Crim. 3d 56.17 sets forth the following claims necessary to establish a charge of battery against a law enforcement officer:
1. That the defendant intentionally caused physical contact with ____ in a rude, insulting or angry manner;
2. That ___ was a state correctional officer or employee and defendant was a person in the custody of the Secretary of Corrections;
. . . .
3. That ___ was engaged in the performance of (his) (her) duty; and
4. That this act occurred on or about the ___ day of ___, in ___ County, Kansas.
*834 In determining whether his prior convictions are an element of the crime, the defendant asks this court to more fully scrutinize the phrase "in custody of the secretary of corrections." K.S.A. 2002 Supp. 21-3413(a)(2). He reasons that the only way a person can be in the custody of the Secretary of Corrections is to have been charged, convicted, and sentenced to imprisonment on a felony charge. See K.S.A. 2002 Supp. 21-3105(1) ("A felony is a crime punishable by death or by imprisonment in any state correctional institution or a crime which is defined as a felony by law.") He disagrees with the Court of Appeals' finding that this phrase only refers to the offender's status and does not require the State to prove the defendant is in custody upon a charge or conviction of a felony under Taylor.
The State argues this issue hinges on the definition of the statutory language "elements of the present crime." "Elements of crime" is defined in Black's Law Dictionary as "[t]hose constituent parts of a crime which must be proved by the prosecution to sustain a conviction." Black's Law Dictionary 520 (6th ed. 1990). The State distinguishes this case from Taylor, contending that the plain language of the statute does not require that a defendant's specific prior conviction be proven; rather, it need only prove the defendant's status as being "in custody of the secretary of corrections." K.S.A. 2002 Supp. 21-3413(a)(2).
The arguments of the defendant fail for several reasons. The defendant's initial contention that the only way a person can be in the custody of the Secretary of Corrections is by committing a felony is contradicted by K.S.A. 2002 Supp. 75-5206(b), which provides in relevant part:
"All institutions of the department of corrections shall be institutions for the incarceration of felons sentenced to the custody of the secretary of corrections. The secretary may enter into interagency agreements authorizing the use of department of corrections' institutions for the temporary housing of pretrial detainees, misdemeanor offenders and other persons confined in local detention facilities or jails when the local facility cannot be used to house those persons due to a natural disaster or other emergency."
This statutory authority, which demonstrates that a person can be in the custody of the Secretary of Corrections without having been *835 convicted of a felony, discredits the defendant's first argument that the defendant's prior felony convictions should be considered an element of the crime.
Further support for inclusion of the defendant's prior felony convictions is found in State v. Rapp, 26 Kan. App. 2d 595, 992 P.2d 226 (1999), rev. denied 269 Kan. 939 (2000). Rapp was convicted of aggravated failure to appear, an element of which is "failing to surrender oneself within 30 days . . . by one who is charged with a felony." K.S.A. 21-3814. In the underlying case supporting the conviction, Rapp was convicted of two felonies and the district court counted only one of them in calculating his criminal history, reasoning that one of the underlying felonies was a necessary element of the crime under K.S.A. 21-4710(d)(11).
The Court of Appeals concluded that Rapp's felony convictions were not elements of aggravated failure to appear and should have been counted in his criminal history, reasoning "that a felony conviction is not a legal predicate necessary to support a subsequent conviction for aggravated failure to appear" and K.S.A. 21-4710(d)(11) speaks only to prior convictions. 26 Kan. App. 2d at 596.
The plain language of K.S.A. 2002 Supp. 21-3413(a)(2) undermines the defendant's argument that 21-4710(d)(11) requires that the State prove an inmate was in the custody of the Secretary of Corrections. The plain language does not require that the State prove why the inmate was in such custody. A prior conviction is not a legal predicate necessary to support a conviction of attempted battery against a law enforcement officer in light of K.S.A. 2002 Supp. 75-5206(b).
Nevertheless, the defendant points to our decision in State v. Taylor, 262 Kan. 471, 939 P.2d 304 (1997), in support of his position that his prior felony convictions should be excluded. Taylor was convicted of aggravated escape from custody under K.S.A. 21-3810(a), which was defined as "escaping while held in lawful custody upon a charge or conviction of a felony." The district court excluded all of Taylor's previous felony convictions that had been consolidated for trial with convictions from other complaints. The court found that when one conviction, previously consolidated for *836 trial with convictions from other complaints, is used as an element in a subsequent crime, the other previously consolidated convictions could not be used in calculating the defendant's criminal history. 262 Kan. at 472.
We reversed on appeal, concluding that "Taylor's aggravated escape charge requires the use of a prior conviction as an element of that crime," but the intent of the legislature is to include all prior convictions in an offender's criminal history unless prohibited by statute. 262 Kan. at 479. It was held that all of Taylor's prior convictions, other than the conviction used to provide an element of the aggravated escape charges, should be used in calculating his criminal history. 262 Kan. at 479.
The Court of Appeals and the State distinguish this case from Taylor because aggravated escape from custody required that the defendant be "in lawful custody upon a charge or conviction of a felony," while the charge in this case, battery against a law enforcement officer, requires only that the defendant be "in custody of the secretary of corrections." See also State v. Gill, No. 89,412, unpublished Court of Appeals opinion filed July 11, 2003 (adopting the reasoning of the Perez-Moran court in concluding that the use of the in-custody conviction to compute the defendant's criminal history score did not violate K.S.A. 21-4710[d][11]). We agree.
Subsequent amendments contained in K.S.A. 2002 Supp. 21-3810(a), aggravated escape from custody, demonstrate the clear distinction of escape upon a charge or conviction of a felony and escape while in custody of the Secretary of Corrections. The legislature, in amending 21-3810(a), provided seven different methods of escape while held in lawful custody, including "(1) upon a charge or conviction of a felony" and "(7) upon incarceration at a state correctional institution as defined in K.S.A. 75-5202 and amendments thereto, while in the custody of the secretary of corrections." Thus, escape upon a charge or conviction incorporates as an essential element of the offense a charge or conviction of a felony, which felony conviction may not be included in a defendant's criminal history under K.S.A. 21-4710(d)(11). However, escape while in the custody of the Secretary of Corrections incorporates *837 as an essential element of the offense only that a defendant be in custody of the Secretary of Corrections.
This distinction is explained in a recent Court of Appeals decision, State v. Brown, 32 Kan. App. 2d 34, 80 P.3d 404, rev. denied 275 Kan. 965 (2003). The Court of Appeals considered whether the defendant's prior crimes were elements of his attempted aggravated escape from custody conviction under Taylor and K.S.A. 2002 Supp. 21-3810(a)(7). In concluding that his prior convictions were not elements of the crime, the court reasoned:
"The key to the rationale in Taylor appears to be a portion of the aggravated escape statute that does not pertain to the present case due to amendment. At the time of Taylor, K.S.A. 21-3810(a) required, inter alia, that the escapee be `in lawful custody upon a charge or conviction of a felony.' (Emphasis added). K.S.A. 21-3810(a); 262 Kan. at 479. The statute was later amended to the current version, the version in effect at the time of Brown's escape, in which there are seven alternative scenarios that are to be considered within the ambit of aggravated escape without the use of violence or the threat of violence. See K.S.A. 2002 Supp. 21-3810(a).
"The language `upon a charge or conviction of a felony' is indeed still included within K.S.A. 2002 Supp. 21-3810(a)(1) but only as one of the seven alternative scenarios under K.S.A. 2002 Supp. 21-3810(a). K.S.A. 2002 Supp. 21-3810(a)(7) does not contain this language; instead, it merely requires the escapee to have been incarcerated and in the custody of the secretary of corrections.
"`"In Kansas all crimes are statutory and the elements necessary to constitute a crime must be gathered wholly from the statute."' State v. Smith, 245 Kan. 381, 396, 781 P.2d 666 (1989) (quoting State v. Jackson, 239 Kan. 463, Syl. ¶ 4, 721 P.2d 232 [1986]).
"It follows that under K.S.A. 2002 Supp. 21-3810(a)(1), at least one crime for which an alleged escapee was convicted or charged must serve as an element of aggravated escape per Taylor. Since substantially different language was used in K.S.A. 2002 Supp. 21-3810(a)(7) and the seven scenarios presented under section (a) are all connected using the conjunction `or,' it would belie the plain meaning of that section to require proof of conviction when criminal elements must be derived only from the statute.
"It appears that proof of Brown's in-custody status was required by K.S.A. 2002 Supp. 21-3810(a)(7), not proof of a conviction that created that status. Hence, all of Brown's prior convictions were correctly included in his criminal history score."
Through its amendment of 21-3810, the legislature has made it clear that a distinction exists between being held in lawful custody upon a charge or conviction of a felony and simply being held in *838 the custody of the Secretary of Corrections. The additional statutory language that the inmate be in lawful custody upon a charge or conviction of a felony, the subsequent amendment of 21-3810(a), and Brown's interpretation of statutory language similar to that in this case, distinguishes this case from Taylor and supports the Court of Appeals' inclusion of the defendant's prior felony convictions in this case. Other arguments advanced by the defendant attacking the Court of Appeals' decision are without merit and need not be addressed by this court.

Enhancement of penalties and elevation from misdemeanor to felony
The defendant argues that the Court of Appeals failed to address the remaining two prongs of K.S.A. 21-4710(d)(11), i.e., whether the prior convictions enhance the severity level or applicable penalties or elevate the classification from a misdemeanor to felony. However, the Court of Appeals summarily rejected the defendant's contentions by concluding that his two prior felony convictions did not appear to fall under any exception under K.S.A. 21-4710(a) or (d)(11). Perez-Moran, 31 Kan. App. 2d at 330.
Battery is a class B person misdemeanor. K.S.A. 2002 Supp. 21-3412(b). Battery against a law enforcement officer adopts the definition of battery set forth in K.S.A. 2002 Supp. 21-3412. Battery against a law enforcement officer committed against a uniformed state, county, or city law enforcement officer other than a city, state, county, or juvenile correctional officer or employee is a class A person misdemeanor. K.S.A. 2002 Supp. 21-3413(a)(1), (b).
According to K.S.A. 2002 Supp. 21-3412:
"(a) Battery is:
(1) Intentionally or recklessly causing bodily harm to another person, or
(2) intentionally causing physical contact with another person when done in a rude, insulting or angry manner.
"(b) Battery is a class B person misdemeanor."
However, "[b]attery against a law enforcement officer is a battery, as defined in K.S.A. 21-3412 and amendments thereto: . . . (2) committed against a state correctional officer or employee by a person in custody of the secretary of corrections, while such officer *839 or employee is engaged in the performance of such officer's or employee's duty" and is a severity level 5, person felony. K.S.A. 2002 Supp. 21-3413(a)(2), (b). Likewise, battery against a city, county, or juvenile correctional officer or employee by a person confined in a holding facility, jail, or juvenile correctional or detention facility is a severity level 5, person felony. K.S.A. 2002 Supp. 21-3413(a)(3), (4), (5), (b).
The defendant contends that by altering the identity of the victim from a member of the general public to a state correctional officer, the legislature has enhanced the severity level or applicable penalties and elevated the classification from a misdemeanor to a felony. He argues this transformation occurs when an offender is in the custody of the Secretary of Corrections upon a charge or conviction of a felony.
The State responds that the legislature is concerned with the classification of the defendant rather than his prior conviction, citing State v. Lanning, 260 Kan. 815, 819, 925 P.2d 1145 (1996) (prior juvenile adjudication determines when the juvenile should be classified as an adult and does not enhance the severity level of the conviction under 21-4710[d][11]). It contends review of the statutory language reveals that the legislature is concerned with the status of both the offender and the victim. The State likens K.S.A. 2002 Supp. 21-3413 to K.S.A. 2002 Supp. 21-3826(c)(2) and (d), which provides that traffic in contraband in a correctional facility carries a lesser crime severity level than the same act when committed by a correctional institution employee.
Examining the statute in its entirety, it is evident that the legislature wanted to discourage confined persons from committing battery against law enforcement officers in correctional facilities by elevating the severity level of the crime to a felony. Its intent does not appear to punish those with prior convictions more severely, as a person with prior convictions who batters a law enforcement officer outside of a correctional facility would still only be charged with a misdemeanor. See K.S.A. 2002 Supp. 21-3413(a)(1),(b). Rather, the structure of the statute demonstrates an intent to promote order and safety in prisons, juvenile facilities, and jails by *840 providing a stronger deterrent to inmates contemplating battering an officer or employee.
No dispute exists that the defendant's acts satisfied every element of K.S.A. 2002 Supp. 21-3413(a)(2). Violation of this statute is a severity level 5 felony. To facilitate the intent of the legislature, the penalty is enhanced based on the status of both the offender and the victim. The misdemeanor offense of attempted battery against a law enforcement officer is a completely separate offense involving a completely different status of the offender and the victim. The defendant's prior convictions did not enhance the applicable penalty or elevate the crime from a misdemeanor to a felony under K.S.A. 21-4710(d)(11). The Court of Appeals correctly found that the defendant's prior convictions should be used in scoring his criminal history.
Affirmed.
Beier, J., not participating.
Brazil, S.J., assigned.[1]
NOTES
[1]  REPORTER'S NOTE: Judge J. Patrick Brazil was appointed to hear case No. 89,021 vice Justice Beier pursuant to the authority vested in the Supreme Court by K.S.A. 20-2616.
