Defendant-Appellant was charged with assault of a law enforcement officer in the second degree and armed criminal action. In a separate cause he was charged with attempted escape from confinement and armed criminal action. He entered into a plea agreement and appeared before the court on January 12, 1996, entering a plea of guilty to all charges.
Defendant appeals in both matters, presenting an identical point relied on. In that point, he contends that the trial court erred in sentencing him as a “Class X offender,” because Section 558.019, RSMo 1994, did not contain procedures for the court to find him to be such an offender. His full point is set out marginally.1
Because the point raised in both matters is identical, the appeals were consolidated in the interest of judicial economy. We conclude there was no merit to the contention and affirm the convictions and sentences.
As a part of the plea-bargain agreement, Defendant was permitted to challenge the State’s attempt to have Defendant sentenced as a prior, persistent and Class X offender. After hearing evidence and comments of Defendant and counsel for both sides, the trial judge found Defendant to be a Class X offender under Section 558.019, and a prior and persistent offender under Section 558.016, RSMo 1994.
Defendant’s contention is that the court had no jurisdiction because there was no procedure for such a finding. He does not contend that the procedure followed lacked due process. Evidence was presented on his offender status and Defendant’s counsel was afforded the right of cross-examination.
“It has always been the rule that, when a clear main power is granted by the law, everything necessary to make it effectual to attain its principal end is necessarily implied.” State v. Burgin, 654 S.W.2d 627, 629-30 (Mo.App.1983)(quoting Shull v. Boyd, 251 Mo. 452, 158 S.W. 313, 320 (1913)). Although there was no specific procedural provision governing how one is found to be a Class X offender, the court may properly implement that section if it follows a procedure that insures due process. See Burgin, 654 S.W.2d at 630.
In Burgin, the defendant was sentenced to an extended prison term as a persistent sexual offender. Section 558.018, RSMo Supp. 1980, under which the defendant was sentenced, did not set forth the procedure for that determination. The defendant argued that because there was no prescribed procedure in the statute the court did not have the power to impose an extended sentence.
Relying upon Shull and other cases, the Court in Burgin held that:
[W]hen the legislature grants the power to impose an extended term for a person found to be a persistent sexual offender, the power to do all that is necessary to accomplish the sentencing of such a person has also been granted by necessary implication, and that in such cases the courts need only follow a procedure which will insure due process.
654 S.W.2d at 630.
In finding Defendant to be a persistent and Class X offender, the trial judge followed *282procedures that accorded due process of law to the Defendant. Thus there is no merit to these appeals. State v. Davis, 663 S.W.2d 301, 306-06 (Mo.App.1983); Burgin, 654 S.W.2d at 630.
The judgments are affirmed.
BARNEY, P.J., and GARRISON, J., concur.. The trial court erred in sentencing Appellant as a persistent and Class X offender, in violation of Appellant's right to due process of law as guaranteed by the Fourteenth Amendment to the United States Constitution and Article I, Section 10 of the Missouri Constitution, in that the court lacked jurisdiction to find Appellant to be a persistent or Class X offender and to sentence him as'such, because at the time of Appellant’s guilty plea, there was no procedure under Section 558.019, RSMo 1994, for pleading, proving, or finding persistent or Class X offender status, and the procedure was governed by the law in effect at the time of the plea.