
548 S.E.2d 59 (2001)
249 Ga. App. 300
PAPADOUPALOS
v.
The STATE.
No. A01A0640.
Court of Appeals of Georgia.
April 19, 2001.
*60 Phillips & Kitchings, Richard D. Phillips, Ludowici, Joseph C. Kitchings, Hinesville, for appellant.
J. Thomas Durden, Jr., Dist. Atty., Richard E. Braun Jr., Asst. Dist. Atty., for appellee.
JOHNSON, Presiding Judge.
Eric Papadoupalos was charged with trafficking in cocaine. The state agreed to let him plead guilty to the lesser included offense of possession of cocaine with intent to distribute. Papadoupalos entered a nonnegotiated guilty plea to possession of cocaine with intent to distribute. The sentencing was then scheduled for a later date. At the sentencing hearing, the state introduced copies of a prior North Carolina drug conviction and a prior federal drug conviction. Both convictions were for possession with intent to sell cocaine. The trial court considered these convictions and sentenced Papadoupalos under the recidivist statute, OCGA § 17-10-7(a), and the sentencing statute for possession of cocaine with intent to distribute, OCGA § 16-13-30(d), to the maximum sentence of 30 years, 15 years to serve and 15 years suspended.
1. Papadoupalos primarily argues that the trial court erred in sentencing him to 30 years under OCGA §§ 17-10-7(a) and 16-13-30(d). We agree.
OCGA § 17-10-7(a) provides that a defendant convicted of a felony punishable by confinement in a penal institution may be sentenced to the longest period of time prescribed for the punishment of the offense if he had previously been convicted of a felony offense in Georgia, in another state, or in a federal court, which offense, if committed in this state would be a felony and punishable by confinement in a penal institution. OCGA § 16-13-30(d) provides that any defendant who manufactures, delivers, distributes, dispenses, administers, sells, or possesses with intent to distribute any controlled substance in Schedule I or Schedule II of OCGA § 16-13-24(b) shall be guilty of a felony and, if convicted, shall be punished by imprisonment for not less than five years nor more than thirty years. This Code section specifically provides that the provisions of OCGA § 17-10-7(a) shall not apply to a sentence imposed for a second offense.
Papadoupalos argues that OCGA § 17-10-7(a) does not apply to a sentence imposed under OCGA § 16-13-30(d). Because we agree that the trial court erroneously sentenced Papadoupalos using OCGA § 17-10-7(a), we vacate Papadoupalos' sentence and remand the case for resentencing in accordance with his plea to possession of cocaine with intent to distribute.
The state admits that the trial court errantly treated this case as though it were a possession of cocaine charge under OCGA § 16-13-30(a) rather than a possession of cocaine with intent to distribute charge under OCGA § 16-13-30(b). At sentencing, even the state treated this offense as a mere possession case. This is important because OCGA § 16-13-30(d), and its prohibition against using OCGA § 17-10-7(a), does not apply to a simple possession case but does apply to a possession of cocaine with intent to distribute charge.
The state concedes in its appellate brief: "[i]f the charge is the greater offense of possession with intent to distribute, the judge may not use [OCGA] § 17-10-7 and also may not use any other jurisdiction's *61 conviction as the enhancement sections of OCGA § 16-13-30 only apply to subsequent convictions of the Georgia Controlled Substances Act."[1] The record shows that Papadoupalos pled guilty to possession of cocaine with intent to distribute, but was sentenced as if he pled guilty to simple possession of cocaine. The sentencing transcript shows that the trial court sentenced Papadoupalos to 30 years "pursuant to O.C.G.A. Section 17-10-7." This was clearly error.
According to the state, even if the trial court did err by considering Papadoupalos as a recidivist under OCGA § 17-10-7(a), any error was harmless since it was within the trial court's discretion to sentence Papadoupalos to 30 years for the offense of possession of cocaine with intent to distribute.[2] The state cites case law establishing that this Court will not review for legal error any sentence which is within the statutory limits.[3] However, while the case law relied on by the state is undoubtedly a correct statement of the law, it does not properly address the enumerations of error raised by Papadoupalos.
Papadoupalos' enumerations of error not only call into question the excessiveness of the sentence, but also the propriety of the process the trial court used in considering evidence in aggravation of punishment. Because procedural matters relating to sentencing are subject to review even though the sentence itself is within the statutory limit, Papadoupalos is entitled to a review of his enumerations of error concerning the evidence taken at the sentencing hearing and the trial court's consideration of the evidence in rendering its sentence.[4]
Based on the record before us, it is clear that the trial court erred in sentencing Papadoupalos pursuant to the recidivist statute. Accordingly, we hereby remand this case to the trial court for resentencing. We note that the trial court is authorized to use its discretion in resentencing Papadoupalos to a term of imprisonment within the statutory range provided for in OCGA § 16-13-30(d).
2. Based on our holding in Division 1, Papadoupalos' remaining enumerations of error are rendered moot.
Sentence vacated and case remanded for resentencing.
RUFFIN and ELLINGTON, JJ., concur.
NOTES
[1]  (Emphasis in original.)
[2]  OCGA § 16-13-30(b), (d).
[3]  Harden v. State, 239 Ga.App. 700, 702(3), 521 S.E.2d 829 (1999); Taylor v. State, 232 Ga.App. 825, 827(7), 502 S.E.2d 540 (1998).
[4]  Sinkfield v. State, 262 Ga. 239(1), 416 S.E.2d 288 (1992).
