
281 Kan. 169 (2006)
STATE OF KANSAS, Appellee,
v.
JEFFREY L. DAVIS, Appellant.
No. 90,982.
Supreme Court of Kansas.
Opinion filed March 17, 2006.
*170 Melissa Kasprzyk, of Wright, Henson, Clark, Hutton, Mudrick & Gragson, LLP, of Topeka, was on the briefs for appellant.
Douglas W. McNett, assistant county attorney, and Phill Kline, attorney general, were on the brief for appellee.
The opinion of the court was delivered by
NUSS, J.:
Jeffrey L. Davis appeals the denial of his motion to correct an illegal sentence. After he was charged with rape, aggravated kidnapping, and battery, his attorney filed a motion to determine Davis' competency. Although the district magistrate judge ordered the competency determination, his order was returned without service on the hospital. Despite the lack of a competency determination, Davis' preliminary hearing, arraignment, and jury trial proceeded.
After Davis' convictions of two counts of rape and his accompanying sentence of 620 months' imprisonment were affirmed on appeal, he filed a motion alleging that the trial court lacked jurisdiction to convict him when it failed to suspend proceedings in order to determine his competency. A different district court judge from the trial judge conducted a hearing on the motion. After finding that Davis waived the illegal sentence issue by failing to raise it on his direct appeal, and after retroactively determining that Davis had been competent at the time of his trial 3 years earlier, the district court denied the motion. The Court of Appeals affirmed in State v. Davis, No. 90,982, unpublished opinion filed September 24, 2004. We granted Davis' petition for review under K.S.A. 20-3018(b).
*171 The issues on appeal, and our accompanying holdings, are as follows:
1. Did the second district court err in finding that Davis had waived the illegal sentence issue by failing to raise it on his direct appeal? Yes.
2. Once Davis' competency determination had been ordered, did the first district court err in proceeding through trial? Yes.
Accordingly, we reverse and remand with directions.

FACTS
On September 20, 1999, Jeffrey L. Davis was charged with the rape, aggravated kidnapping, and battery of 16-year-old L.L. in Larned on September 15, 1999. The next day C. Phillip Aldrich was appointed to represent Davis. On October 4, 1999, Aldrich withdrew and the court appointed Douglas Brunson.
On December 22, 1999, Brunson filed a motion to determine competency. After finding no objection from the State, the magistrate judge ordered "that a determination of competency to stand trial should be conducted at the Larned State Hospital." On January 14, 2000, the sheriff returned the order "by permission of the court for reasons defined by LSH [Larned State Hospital]." In other words, no competency evaluation of Davis was performed, and no competency determination was made, by the hospital.
Four months after the filing of the motion, on April 21, 2000, a preliminary hearing was conducted. Following the hearing, Davis was bound over on two counts of rape and one count of aggravated kidnapping.
On May 1, 2000, Davis filed a pro se motion to dismiss Brunson and appoint new counsel. Two days later, on May 3, 2000, the court appointed Julie Fletcher Cowell as Davis' third counsel. Although Cowell appeared with Davis at his arraignment on May 18, she withdrew as counsel 4 days later. On May 24, Andrew Brown was appointed as Davis' fourth counsel.
Brown represented Davis at the jury trial occurring on September 5-6, 2000, where Davis testified on his own behalf. The jury found Davis guilty of two counts of rape.
*172 On September 11, 2000, Brown filed a motion for a new trial and a motion for judgment of acquittal. The trial court denied both motions. Davis was subsequently sentenced to a controlling term of 620 months' imprisonment.
Davis appealed to the Court of Appeals, arguing there was insufficient evidence to support his convictions, that the trial court erred in admitting an alleged prior inconsistent statement, and that the charges were multiplicitous. The Court of Appeals affirmed Davis' convictions in State v. Davis, No. 86,158, unpublished opinion filed September 20, 2002, rev. denied 275 Kan. 966 (2002).
Four days later, on September 24, 2002, Davis filed a pro se motion to correct his sentence, pursuant to K.S.A. 22-3504(1) and K.S.A. 22-3402(1). On January 27, 2003, Davis filed a second pro se motion to correct an illegal sentence pursuant to K.S.A. 22-3504(1). Both motions alleged that the trial court lacked jurisdiction when it failed to suspend proceedings in order to determine if Davis was competent to stand trial. On March 28, 2003, Davis filed a motion objecting to a retrospective determination of competency.
A district court judge different from the trial judge conducted an evidentiary hearing on June 20, 2003. There, Mark Schloemer, the Undersheriff of Pawnee County, testified he believed that the competency order had been returned because it was directed to the Larned State Hospital and not the Larned State Security Hospital. He opined that "the one word `security' being left out is significant to the hospital, because it is defined by State statute[;] they are separate entities."
Davis' former attorney, Douglas Brunson, also testified. Although he made a cursory examination of the file, he essentially testified from memory. Brunson stated that he had a lengthy prosecutorial tenure as the Kiowa County Attorney and had extensive experience during his 31 years of practicing law in criminal prosecutions and defense. He testified that he does not file many motions, and when he does, he feels that they are pertinent at the time. Brunson further testified that he assumed he had a good faith basis for the motion to determine competency when filed on December 22, 1999. He additionally stated that he probably talked to *173 the county attorney about "the matter." According to Brunson, he had no distinct recollection of a formalized hearing on his motion but was sure the county attorney was notified. He assumed a hearing had been conducted and defendant Davis had been present because in his experience that was "normal" for competency motions and orders.
Brunson also testified that he did not have concerns about Davis' competency at the time of the preliminary hearing 4 months later:
"Q. Based on your thirty-one years of experience, if you were concerned about whether or not Mr. Davis was competent, would you have not objected to proceeding with preliminary hearing?
"A. I would never allow a client, if I knowinglyI would never allow a client to participate in a hearing in which he was not able to adequately aid in his defense with me. I would not knowingly do that.
"Q. And if I was to tell you the record itself is devoid of any objection at the time of the preliminary hearing as to Mr. Davis' competency then we can assume that you had no concerns on that date?
"A. You canyou can certainly assume that I felt he was competent at that time to assist me, yes."
However, on cross-examination Brunson candidly conceded that he did not hold a degree in psychology or any related field and could make a mistake regarding a client's competency.
The State also proffered the transcript of the May 2000 arraignment in which the district court judge and Davis spoke concerning Davis' understanding of his constitutional rights, the transcript of Davis' September 2000 trial testimony, and all of Davis' pro se motions.
On July 1, 2003, the second district court judge denied Davis' motion to correct an illegal sentence, stating:
"Review of the file and transcripts of proceedings, particularly Defendant's Arraignment and Trial, leave no doubt as to Defendant's competency to understand the nature of the charges against him, and to fully assist his counsel with his defense. The [prior] Court did not issue a formal finding as to competency, but clearly the Court and Trial counsel for the State and the Defendant had no doubt as to Mr. Davis' competency to stand Trial. Errors that do not affirmatively cause prejudice to the substantial rights of the complaining party are not fatal when substantial justice has been done. State v. Clark, 263 Kan. 370 (1997). The Trial Court had jurisdiction to proceed [in 2000]."
*174 The court further noted Davis waived the illegal sentence issue by failing to raise it on direct appeal, citing State v. Johnson, 269 Kan. 594, 7 P.3d 294 (2000).
Davis timely appealed. On September 24, 2004, the Court of Appeals held that it could correct an illegal sentence at any time, citing K.S.A. 22-3504(1). It affirmed, however, the district court's retrospective determination of Davis' competency and concluded the trial court had jurisdiction to conduct the trial in September 2000:
"In its appellate brief, the State makes much of the fact that by all appearances, Davis was perfectly competent to assist in his defense. The record on appeal supports this assertion. In addition, the order for the competency evaluation was directed to the wrong institution and could not be completed as ordered.
"We do not agree with Davis that his sentence is illegal because we find that the trial court had jurisdiction to conduct Davis' trial. The trial court did not err by denying Davis' motion to correct an illegal sentence." Slip op. at 7.
We granted Davis' petition for review.

ANALYSIS

Standard of Review
Davis continues to argue that his sentence was illegal because the district court lacked jurisdiction when it failed to suspend proceedings once his competency to stand trial was in legitimate dispute. An illegal sentence includes one imposed by a court without jurisdiction. State v. Harper, 275 Kan. 888, 890, 69 P.3d 1105 (2003). The issue of whether a criminal sentence is illegal is a question of law. Our review of questions of law is unlimited. State v. Denney, 278 Kan. 643, 646, 101 P.3d 1257 (2004); State v. Huff, 277 Kan. 195, 199, 83 P.3d 206 (2004).

Issue 1: Did the second district court err in finding that Davis had waived the illegal sentence issue by failing to raise it on his direct appeal?

The district court found that Davis waived the illegal sentence issue by failing to raise it on his direct appeal, citing Johnson, 269 Kan. at 601. The State agrees. In response, Davis argues that jurisdictional issues cannot be waived as a matter of law, citing State *175 v. Redford, 242 Kan. 658, 672, 750 P.2d 1013 (1988). The Court of Appeals impliedly held no waiver existed when it stated that the appellate court could correct an illegal sentence at any time, citing K.S.A. 22-3504(1). We begin our analysis by observing that the United States Supreme Court has stated: "[I]t is contradictory to argue that a defendant may be incompetent, and yet knowingly or intelligently `waive' his right to have the court determine his capacity to stand trial. [Citation omitted.]" Pate v. Robinson, 383 U.S. 375, 384, 15 L. Ed. 2d 815, 86 S. Ct. 836 (1966).
In Johnson, 269 Kan. 594, the defendant pled guilty to two counts of rape, one count of aggravated battery, and one count of kidnapping. On appeal, he argued that the district court erred in disregarding the plea agreement. The appeal was denied, and Johnson subsequently filed a motion to correct an illegal sentence, arguing that the State violated the plea agreement during sentencing. In upholding the denial of the motion, this court held that K.S.A. 22-3504(1) "may not be used as a vehicle to breathe new life into appellate issues previously abandoned or adversely determined." 269 Kan. at 602.
Johnson, however, is distinguishable for several reasons. First, the claimed error did not fall within the definition of an illegal sentence. Second, defendant had previously raised the illegal sentence issue on his direct appeal and then dismissed his appeal. By contrast, in the instant case the alleged error is lack of jurisdiction, and we have held that a lack of jurisdiction to impose a sentence can make the sentence illegal. See Harper, 275 Kan. at 890. Additionally, here the jurisdiction issue has not been previously raised; as the Court of Appeals observed, an appellate court can correct an illegal sentence, e.g., one imposed without jurisdiction, at any time. See K.S.A. 22-3504(1); Denney, 278 Kan. at 646.
Moreover, because a judgment that is rendered without jurisdiction is void (State v. Chatmon, 234 Kan. 197, 205, 671 P.2d 531 [1983]), it may be "attacked at any time and may be vacated because it is a nullity." State v. Minor, 197 Kan. 296, 300, 416 P.2d 724 (1966).
We conclude that the district court erred in finding that Davis waived the illegal sentence issue by failing to raise it on his direct appeal.


*176 Issue Two: Once Davis' competency determination had been ordered, did the first district court err in proceeding through trial?


The Statute
The State argues in the alternative that if Davis did not waive his right to argue an illegal sentence for lack of jurisdiction, his sentence is not illegal. Davis responds that the Kansas statute requires a suspension of the proceedings once his competency is in legitimate dispute, that the failure to suspend violated his rights to due process, and that the resulting sentence is therefore illegal. Before addressing their respective positions, a short review of the law governing competency to stand trial is warranted.
In Medina v. California, 505 U.S. 437, 453, 120 L. Ed. 2d 353, 112 S. Ct. 2572 (1992), the United States Supreme Court reiterated that the "criminal trial of an incompetent defendant violates due process." Some have opined that the common-law prohibition is "`a by-product of the ban against trials in absentia; the mentally incompetent defendant, though physically present in the courtroom, is in reality afforded no opportunity to defend himself.'" Drope v. Missouri, 420 U.S. 162, 171, 43 L. Ed. 2d 103, 95 S. Ct. 896 (1975). In Drope, the Supreme Court declared the prohibition "fundamental to an adversary system of justice." 420 U.S. at 172. Accordingly, "[S]tate procedures must be adequate to protect this right." Pate, 383 U.S. at 378.
In 1970, 4 years after Pate, the Kansas Legislature appeared to codify these constitutional protections in K.S.A. 22-3301 et seq. Of relevance to the instant case is K.S.A. 22-3302. Subparagraph (1) provides:
"At any time after the defendant has been charged with a crime and before pronouncement of sentence, the defendant, the defendant's counsel or the prosecuting attorney may request a determination of the defendant's competency to stand trial. If, upon the request of either party or upon the judge's own knowledge and observation, the judge before whom the case is pending finds that there is reason to believe that the defendant is incompetent to stand trial the proceedings shall be suspended and a hearing conducted to determine the competency of the defendant." (Emphasis added.)
Subparagraph (4) of the statute provides that if the defendant is eventually found to be competent, "the proceedings which have *177 been suspended shall be resumed." (Emphasis added.) K.S.A. 22-3302(4). On the other hand, "[i]f the defendant is found to be incompetent to stand trial, the court shall proceed in accordance with K.S.A. 22-3303," e.g., if charged with a felony, the defendant "shall be committed for evaluation and treatment to the state security hospital . . . ." (Emphasis added.) K.S.A. 22-3302(5); K.S.A. 22-3303(1).
Interpretation of a statute is a question of law, and this court's review is unlimited. Schmidtlien Electric, Inc. v. Greathouse, 278 Kan. 810, 819, 104 P.3d 378 (2005). In determining whether a statute is open to construction, or in construing a statute, ordinary words are to be given their ordinary meaning and courts are not justified in disregarding the unambiguous language. State v. Haug, 237 Kan. 390, 392, 699 P.2d 535 (1985).
The statute's languagewhen giving ordinary words their ordinary meaningis clear and unequivocal. Once a court "finds that there is reason to believe that the defendant is incompetent to stand trial the proceedings shall be suspended and a hearing conducted to determine the competency of the defendant." (Emphasis added.) K.S.A. 22-3302(1). In the present case, under the plain language of the statute, when the magistrate judge ordered the competency determinationpresumably because under the statute he found "reason to believe that the defendant is incompetent to stand trial"the statute commanded that the criminal proceedings be suspended. The language from subparagraphs (4) and (5) support this analysis, i.e., the criminal proceedings shall not resume until the defendant has been found competent after the mandatory hearing.
To proceed without conducting the hearing not only is a violation of the statute but also a violation of due process. See Pate, 383 U.S. at 378, 384-86 (failure to hold competency hearing, when under Illinois statute the evidence raises a bona fide doubt as to defendant's competency, is denial of due process); see also State v. White, 263 Kan. 283, 316, 950 P.2d 1316 (1997) (if trial court finds evidence exists at time of resentencing which raises "reason to believe" that defendant is not competent, it "shall" hold a competency hearing, citing K.S.A. 22-3302).
*178 The dissent disparages our statement that the magistrate judge ordered the competency determination "presumably because under the statute he found `reason to believe that the defendant is incompetent to stand trial.'" (Emphasis added.) The dissent asserts there is a complete lack of evidence to support the order.
This criticism requires a short response. First, the State did not oppose the motion at the time and later signed its approval of the court order directing the competency determination. Moreover, whether at the district court or appellate levels, the State has never argued a lack of evidence to support the order. Additionally, because the matter was not contested, the magistrate judge was not required toand did notstate in the order the controlling facts and the legal principles controlling his decision. See Supreme Court Rule 165 (2005 Kan. Ct. R. Annot. 217).
Indeed, even if the State had opposed the motion in 2000, an appellate challenge by the Statewith no hearing transcript in the record and an order to which no sufficiency objection was made  would have been unsuccessful. See Hill v. Farm Bur. Mut. Ins. Co., 263 Kan. 703, 706, 952 P.2d 1286 (1998). There, in upholding the denial of a deposition of a records custodian, we held that the appellant is required to designate a record sufficient to establish its claimed error, and that when the appellant fails to object to the trial court's alleged inadequate findings, "the trial court is presumed to have found all facts necessary to support the judgment." (Emphasis added.) 263 Kan. at 706.
In short, because of the State's chosen strategy and the order's acceptable format under Supreme Court rule, the sufficiency of the evidence supporting the order may not be challenged.
Second, even if lack of evidence could be raised procedurally, it would fail substantively. As defense counsel, Brunson was in the best position to determine whether Davis' competency was suspect (see Watts v. Singletary, 87 F.3d 1282, 1288 [11th Cir. 1996]), and his 2003 testimony is uncontroverted about the events surrounding his 1999 motion and resultant court order. Among other things, he testified that based upon his 31 years of experience in criminal law he assumed that he had a good faith basis for the motion, that a *179 hearing was held, and that Davis and the county attorney were present, because that is normal procedure for competency matters.
Additionally, while Brunson's motion was unopposed, the magistrate judge was not required to grant it on that basis. See Gallagher v. Gallagher, 866 P.2d 123, 124 (Alaska 1994); 56 Am. Jur. 2d, Motions, Rules, and Orders § 31 ("While failure to oppose a motion may have a bearing on a court's determination of the motion, an unopposed motion may not be granted unless the court is satisfied that the legal standards for granting the motion have been met."). Accordingly, under the circumstances of this case, it follows that the magistrate judge found "reason to believe that the defendant is incompetent to stand trial," which allowed him to sign the order for the competency determination.
In ruling against Davis' motions to correct an illegal sentence, both the district court and the Court of Appeals relied on State v. Boorigie, 273 Kan. 18, 41 P.3d 764 (2002). In Boorigie, defense counsel orally moved for a competency evaluation. As in the instant case the trial court, after finding no objection from the State, ordered the evaluation. Also as in the instant case, after ordering the evaluation, the court proceeded to the arraignment and also ruled on several motions. On appeal, Boorigie argued that the trial court violated his statutory and due process rights when it failed to suspend all proceedings pending a determination of his competency. This court affirmed. 273 Kan. at 26-27.
Boorigie, however, is distinguishable for several major reasons. First, after the court granted Boorigie's counsel's motion for the competency evaluation, his counsel requested that an arraignment proceed. We considered this request invited error, citing State v. Saleem, 267 Kan. 100, 109, 977 P.2d 921 (1999). 273 Kan. at 27. Second, and most important, the trial court received the results of the evaluation prior to trial. After receipt, the trial court asked defense counsel on the morning of trial for any additional information. When neither the State nor defense counsel provided any, the trial court ruled that Boorigie was competent to stand trial based upon the competency evaluation and proceeded to trial. In effect, the court held a competency hearing. Our court then essentially conducted a harmless error analysis under K.S.A. 60-261 *180 (citing State v. Clark, 263 Kan. 370, 376, 949 P.2d 1099 [1997]). We concluded that the alleged error, i.e., failure to suspend, did not affirmatively cause prejudice because Boorigie was found competent. 273 Kan. at 27.
The Court of Appeals also relied upon Warden v. Conner, 93 Nev. 209, 562 P.2d 483 (1977). There, similar to the instant case, after the trial court ordered a psychiatric examination of the defendant, it failed to suspend further proceedings and provide a competency hearing per Nevada statute before accepting defendant's guilty plea. Conner is easily distinguishable, however, because similar to Boorigie, the trial court reviewed the completed evaluation  before accepting the plea. See 93 Nev. at 210.
The fundamental problem with the State's position in the instant case is that Davis never received a competency evaluation, or a statutory hearing where competency could be judicially determined, before his trial and subsequent conviction. Nor is there anything in the record on appeal to suggest any type of competency determination was made until years later. As mentioned earlier, his due process rights were violated, and the district court had no jurisdiction. Accordingly, under our facts there is no place for a harmless error analysis as was performed in Boorigie.
We agree with the California Court of Appeals in People v. Ary, 118 Cal. App. 4th 1016, 13 Cal. Rptr. 3d 482 (2004). There, the trial court failed to order a competency hearing as required by statute despite substantial evidence of defendant's mental retardation. Citing California Supreme Court precedent, the court stated:
"`Under section 1368 of the Penal Code the trial court has no power to proceed with the trial once a doubt arises as to the sanity of the defendant. In trying defendant without first determining at a hearing his competence to stand trial, the court both denie[s] to defendant a substantial right [citations] and pronounce[s] judgment on him without jurisdiction to do so. In such cases the error is per se prejudicial.' [Citation omitted.]" (Emphasis added.) 118 Cal. App. 4th at 1021.

Retrospective Competency Hearing
Although the first district court judge failed to suspend the proceedings until the court-ordered competency report was received *181 and until a competency determination was made, under certain circumstances the State may rectify the error by a retrospective competency hearing. As the court stated in Ary, 118 Cal. App. 4th at 1028:
"While it is certainly the case that the trial court's error in failing to hold a competency hearing when one is warranted is not subject to harmless error review, this does not mean that the procedural due process violation can never be cured retrospectively, under appropriate circumstances, as the United States Supreme Court has suggested."
In Drope, 420 U.S. at 183, the Supreme Court stated that a retrospective competency hearing is permissible, though "inherent[ly] difficult." In Ary, 118 Cal. App. 4th at 1029-30, the court remanded for consideration of whether such a hearing would be possible under the facts of that case.
Although this court has not specifically addressed the issue of retrospective competency hearings, the Tenth Circuit provides guidance with its general rules. McGregor v. Gibson, 248 F.3d 946, 962-63 (10th Cir. 2001), states:
"Retrospective competency hearings are generally `disfavored' but are `permissible whenever a court can conduct a meaningful hearing to evaluate retrospectively the competency of the defendant.' [Citations omitted.] In the context of deciding whether a state court's retrospective determination of a petitioner's competency violated that petitioner's due process rights, we announced factors to be considered in assessing whether a meaningful retrospective determination can be made:
(1) [T]he passage of time, (2) the availability of contemporaneous medical evidence, including medical records and prior competency determinations, (3) any statements by the defendant in the trial record, and (4) the availability of individuals and trial witnesses, both experts and non-experts, who were in a position to interact with defendant before and during trial, including the trial judge, counsel for both the government and defendant, and jail officials. [Citation omitted.]"
In the present case, after Davis filed his motions to correct an illegal sentence objecting to a retrospective competency determination, the district court held a June 20, 2003, evidentiary hearing on the motions. Without expressly identifying the hearing as one regarding a retrospective competency determination, the Court of Appeals appeared to treat it as such.
*182 Regarding the McGregor factor of statements by the defendant in the trial record, the district court reviewed the transcript of Davis' trial testimony and of the arraignment featuring a colloquy between Davis and the court concerning Davis' understanding of his constitutional rights. It also reviewed all of Davis' pro se motions.
Regarding the McGregor factor of individuals who interacted with the defendant, the court heard Davis' former attorney, Douglas Brunson, testify. While Brunson stated that the motion to determine competency was filed in good faith and was pertinent at the time, he also testified that he did not have concerns about Davis' competency at the time of the preliminary hearing.
However, the record does not disclose the reason for the change in his opinion within 4 months of doubting his client's competency. Nor was he the attorney who prepared and tried the case to the jury. Brunson also admitted that he has no degree in psychology or related fields and could have made a mistake regarding his client's competency to proceed with the preliminary hearing.
Regarding the McGregor factor of contemporaneous medical evidence, the Tenth Circuit emphasized this factor's importance:
"We are influenced greatly by the lack of contemporaneous medical evidence in the record regarding McGregor's competency at the time of the trial. See, e.g., Dusky [v. United States, 362 U.S. 402, 403, 4 L. Ed. 2d 824, 80 S. Ct. 788 (1960)] (concluding no retrospective competency determination could be held `[i]n view of the doubts and ambiguities regarding the legal significance of the psychiatric testimony')." 248 F.3d at 963.
In McGregor, the court at least had some medical amount of evidence about defendant from a psychiatrist and a psychologist. See 248 F.3d at 955-58. The district court in the instant case was provided no medical evidence whatsoever. As the Ninth Circuit Court of Appeals stated in Moran v. Godinez, 57 F.3d 690, 696 (9th Cir. 1994): "[M]edical reports contemporaneous to the time of [trial] greatly increase the chance for an accurate retrospective evaluation of a defendant's competence."
The McGregor court also discussed the lack of contemporaneous medical evidence coupled with its fourth factor, the passage of time:

*183 "Finally, although we emphasize that time is not an insurmountable barrier to a retrospective competency determination, the difficulties arising from the lack of contemporaneous medical evidence are amplified by the further difficulties that necessarily arise from the significant passage of time." 248 F.3d at 963.
While the district court made its competency determination approximately 3 years after Davis' trial, as compared to an appreciably greater period in McGregor, the coupling of such an amount of time with the complete lack of medical evidence is significant. We reach this conclusion with full awareness that the statute regarding determination of competency does not require a psychiatric or psychological examination. See K.S.A. 22-3302(3) ("The court shall determine the issue of competency. . . . The court may order a psychiatric or psychological examination of the defendant." [Emphasis added.]). Here, however, the magistrate judge signed an order for a "determination of competency" to be performed at the Larned State Hospital, which would entail a psychiatric or psychological examination, or both. When a judge "finds that there is reason to believe that the defendant is incompetent to stand trial" (K.S.A. 22-3302[1]), finds that the competency concern is sufficient to warrant an order for a medical determination on the issue (K.S.A. 22-3302[3]), and the record is silent on why the judge did not pursue the medical determination, a retrospective judicial determination of competency based upon no medical evidence whatsoever cannot stand.
Our conclusion does not, as the dissent argues, eliminate several McGregor factors and elevate a third factor to a threshold requirement in cases where a competency determination was ordered but did not occur and there is no contemporaneous medical evidence. Rather, it recognizes the inconsistency, and inherent difficulty, in asking a district court judge to make a defendant's competency determinationwithout any medical evidenceafter a fellow judge 3 years earlier had required the same determination to be made by medical professionals.
The dissent also argues that the order for competency determination was a nullity because it did not strictly conform to the statutory language of K.S.A. 22-3302(3). Specifically, the dissent claims that because the order incorrectly directed Davis to the *184 Larned State Hospital, and not the Larned State Security Hospital, it was incapable of being carried out. Once again, the dissent raises an argument sua sponteeither overlooked, or rejected, by the parties. Like the dissent's earlier assertion of a lack of evidence to support the order for a competency determination, its present argument overlooks the requirements of a court order. It also overlooks the language of K.S.A. 22-3302(1).
The statute requires only that the judge find "reason to believe that the defendant is incompetent to stand trial . . . ." K.S.A. 22-3302(1). As was established earlier, because the competency motion was uncontested by the State, the resultant order was not required to contain the facts and the legal principles controlling the decision. Accordingly, the order was not required to contain the specific finding of "reason to believe the defendant is incompetent"; rather, the finding is inherent in the order. See Supreme Court Rule 165; see also Hill, 263 Kan. at 706 (when no objection to any alleged inadequate findings, trial court presumed to have found all facts necessary to support order). Furthermore, the mere misdirection of the order to the wrong hospital does not eliminate this finding or render it unsubstantiated. And once that finding has been made, then under the statute, "the proceedings shall be suspended." (Emphasis added.) K.S.A. 22-3302(1).
In short, Davis' due process rights were still not adequately protected by the 2003 retrospective competency hearing. Nor, under the facts of this case, can they be adequately protected by remanding for a second retrospective determination of his competency at the time of trial in September 2000. See McGregor, 248 F.3d at 963 ("McGregor's due process rights can not adequately be protected by remanding to the state court for such a determination."). The convictions and sentence are therefore reversed.
If the State wishes to retry Davis, it must pursue a determination of his competency at the time of his retrial. See Drope, 420 U.S. at 183; Dusky, 362 U.S. at 403; McGregor, 248 F.3d at 963. The use of contemporaneous medical evidence regarding his competency is encouraged.
Reversed and remanded with directions.
*185 LUCKERT, J., not participating.
LOCKETT, J., Retired, assigned.
LARSON, S.J. assigned.
McFARLAND, C.J., dissenting:
I dissent from the majority's conclusion that the trial court's failure to suspend the proceedings and conduct a competency hearing was a violation of K.S.A. 22-3302(1) and due process which mandates reversal of the defendant's conviction.
The failure to hold a hearing to determine competency is a denial of due process where the evidence raises a bona fide doubt as to the defendant's competency. State v. White, 263 Kan. 283, 314, 950 P.2d 1316 (1997) (citing Pate v. Robinson, 383 U.S. 375, 15 L. Ed. 2d 815, 86 S. Ct. 836 [1966]). K.S.A. 22-3302 protects a defendant's due process right not to be tried while incompetent by requiring the suspension of proceedings and a competency hearing where the judge finds reason to believe that the defendant is incompetent to stand trial.
K.S.A. 22-3302(1) only requires suspension of the proceedings and a competency hearing where the judge finds reason to believe that the defendant is incompetent to stand trial.
"At any time after the defendant has been charged with a crime and before pronouncement of sentence, the defendant, the defendant's counsel or the prosecuting attorney may request a determination of the defendant's competency to stand trial. If, upon request of either party or upon the judge's own knowledge and observation, the judge before whom the case is pending finds that there is reason to believe that the defendant is incompetent to stand trial the proceedings shall be suspended and a hearing conducted to determine the competency of the defendant." (Emphasis added.) K.S.A. 22-3302(1).
*186 The order in this case made no such finding. Despite this, the majority still finds the order triggered suspension of the proceedings by presuming the magistrate judge found reason to believe the defendant was not competent: "[W]hen the magistrate judge ordered the competency determination  presumably because under the statute he found `reason to believe that the defendant is incompetent to stand trial'-the statute commands that the criminal proceedings should have been suspended." (Emphasis added.)
From this presumption, the majority concludes that there was a bona fide doubt as to the defendant's competency; therefore, there was no jurisdiction to proceed in this case until a competency hearing was held. There is nothing in the record to support such a presumption.
There is nothing in the order itself to support the presumption that the motion was granted because the judge had reason to believe a competency evaluation and hearing were necessary. To the contrary, the language of the order shows it was granted merely because it was unopposed by the State.
There is also no basis for presuming that the motion seeking the competency determination had provided the judge with a factual basis for the order. The motion does not provide a single factual allegation which would support the need for a competency determination. It simply states: "COMES NOW, the Defendant, Jeffery Davis, by and through his court appointed attorney, Douglas S. Brunson, and moves the court for an Order to Determine Competency." A motion seeking a competency determination should allege some facts that would indicate a legitimate question concerning the defendant's competency. Good practice requires no less. As the Supreme Court has recognized, "judges must depend to some extent on counsel to bring issues [of competency] into focus." Drope v. Missouri, 420 U.S. 162, 176-77, 43 L. Ed. 2d 103, 95 S. Ct. 896 (1975).
I am aware that the attorney who filed the motion later testified that he assumed he had had a good faith basis for filing the motion to determine competency. However, he did not testify to any specific behavior or demeanor of the defendant that caused him to believe in the need for a competency hearing. In the absence of *187 such specifics, counsel's testimony that he had a good faith basis for the motion is not entitled to great weight, for counsel would have found himself in an ethical dilemma had he testified otherwise. See Bolius v. Wainwright, 597 F.2d 986, 989-990(5th Cir., 1979) (discounting trial counsel's testimony at a retrospective competency hearing that his client was competent when his client entered a guilty plea because of the ethical dilemma counsel would have faced had he testified his client was not competent).
The record also fails to show that there was a hearing at which the judge was provided facts evidencing a concern about the defendant's competency. The appearance docket does not show any scheduled hearing. The fact that the motion and order are all part of the same document and were filed with the clerk as a single document further indicates that no hearing was set on the motion.
The mere fact that a competency examination was ordered, standing alone as this order does, does not support a presumption that the magistrate judge found there was reason to believe that the defendant was incompetent to stand trial. Cf. McGregor v. Gibson, 248 F.3d 946, 954 (10th Cir. 2001) (en banc) (noting that the mere fact the trial court granted a motion for a competency hearing does not suffice to demonstrate a bona fide doubt that the defendant was not competent).
The next basis for my dissent is that, because there was no evidence demonstrating a bona fide doubt that the defendant was not competent to stand trial, the failure to suspend the proceedings and hold a competency hearing did not deny the defendant due process. See White, 263 Kan. at 314 (citing Pate v. Robinson, 383 U.S. 375) (The failure to hold a hearing to determine competency is a denial of due process where the evidence raised a bona fide doubt as to the defendant's competency.).
Nothing in this case demonstrates there was a bona fide doubt about the defendant's competence. Tellingly, none of the defendant's four attorneys expressed any concern about his competence (other than the factually unsupported motion). Douglas Brunson, the attorney who filed the motion to determine competency, permitted the defendant to proceed to preliminary hearing without having had a competency determination and testified that he had *188 no concern about the defendant's competency at that time. The defendant's next attorney, Julie Fletcher Cowell, told the court at the defendant's arraignment that she was confident he understood the nature of the charges and never raised any concern about the defendant's competency. Andrew Brown, who represented the defendant in the preparation for trial and through the trial, never raised any concern about defendant's competency. If any of those attorneys had any doubt about the defendant's competency, he or she had a duty to either renew the motion or file a new motion to determine competency. None of them did so. The defendant's competency became a nonissue in the proceedings.
There is also absolutely no evidence that the defendant behaved irrationally, nor is there anything in the record about his demeanor that would raise a doubt about competency. This complete absence of any evidence demonstrating a bona fide doubt as to the defendant's competence distinguishes the cases cited by the majority.
In People v. Ary, 118 Cal. App. 4th 1016, 13 Cal. Rptr. 3d 482 (2004), the trial court had conducted a lengthy pretrial hearing on the effect of the defendant's mental retardation on the admissibility of his confession. The evidence from that hearing constituted substantial evidence raising a reasonable doubt about the defendant's competence. In the face of such evidence, the failure to suspend the proceedings and hold a competency hearing violated due process. 118 Cal. App. 4th at 1021-25.
Similarly, in Pate, the trial court had before it "uncontradicted testimony of Robinson's history of pronounced irrational behavior." 383 U.S. at 385-86. That evidence was sufficient to raise a bona fide doubt as to the defendant's competence, triggering the obligation to hold a competency hearing. 383 U.S. at 385-86.
The existence in both of those cases of evidence raising a "reasonable doubt" or a "bona fide doubt" about the defendant's competence stands in stark contrast to the compete lack of such evidence in this case. Further, the record here overwhelmingly demonstrates that the defendant was competent in the months leading up to his trial and during the trial.
First, the defendant filed pro se pleadings and motions that compellingly demonstrate that he understood the nature and purpose *189 of the proceedings against him and was capable of assisting in his defense. He filed a pro se motion requesting the dismissal of his attorney and the appointment of new counsel, in which he identified his right to assist his attorney in his defense, and alleged that his attorney had failed to obtain a new defense investigator after the one appointed by the court had died and had failed to respond to his requests for a copy of his file. He filed a pro se petition in federal court challenging the legality of his arrest, the search of his home, and the failure to allow him access to law books. He also filed a pro se habeas corpus action in the state court alleging that his arrest was without probable cause and the search of his home was illegal because it occurred prior to the time the warrant was issued, in violation of his 4th, 5th, 6th, and 14th Amendment rights. Moreover, in response to the court's questions about his allegations, the defendant did a good job identifying the subject matter of most of the constitutional amendments he had cited.
Second, the defendant's responses to the trial court's inquiry about his understanding of his decision to enter into stipulations just 1 week before trial began demonstrate his competence. Also, in that same proceeding, the defendant brought to his counsel's attention the fact that he was not bound over on the battery charge. Of course, that was because the battery charge was a misdemeanor. Nevertheless, the comment shows the defendant was capable of assisting his attorney in his defense.
Last, and most importantly, the defendant's testimony at trial, which covers 35 pages of the transcript, demonstrates that he understood the nature of the proceedings, the charges against him, and his consent defense. He had great recall of the events, was cooperative with his attorney during direct examination, was not overly subject to suggestion or leading on cross-examination, and was generally clear, coherent, and intelligent. From the record, it is established the defendant actively and appropriately participated in the trial and pretrial proceedings. This is not the more typical situation where a defendant has made only minimal statements on the record, leaving his mental functioning a matter of speculation.
*190 Due process is violated when a criminal defendant is tried and convicted while he or she is not competent to stand trial. See Pate, 383 U.S. at 378. Because a defendant's competency status can change (Drope, 420 U.S. at 181), competency is determined by the defendant's present ability to understand the charges and rationally assist in the defense. See State v. Brown, 204 Kan. 430, 433, 464 P.2d 161(1970). Thus, the defendant's competency at the time of trial is the relevant time period when considering whether a due process violation occurred. In this case, even presuming there was a question of competency when the motion was filed, the record clearly shows that there was no competency issue at the time of the trial. In fact, seldom have I seen such a superior level of functioning and understanding of the judicial process by a defendant so clearly demonstrated in the record.
In summary, the failure to hold a hearing to determine competency is a denial of due process only where the evidence raises a bona fide doubt as to the defendant's competency. In the absence of any such evidence, the sole fact that the magistrate judge ordered a competency determination is insufficient to raise such a doubt. In this case, not only is there no evidence demonstrating a doubt as to the defendant's competency, this record compellingly demonstrates the defendant was competent at the time of trial. Therefore, I cannot agree that the failure to hold a competency determination and suspend the proceedings deprived the court of jurisdiction and violated the defendant's due process rights.
I now turn to the issue of the retrospective competency hearing. I disagree with the majority's analysis of the four McGregor factors to be applied in determining whether a meaningful retrospective competency determination can be made.
The four McGregor factors are (1) the passage of time, (2) the availability of contemporaneous medical evidence, including medical records and prior competency determinations, (3) defendant's statements in the trial record, and (4) the availability of witnesses who were in a position to interact with defendant before and during trial, including the trial judge, counsel for both the State and defendant, and jail officials. McGregor, 248 F.3d at 962-63.
*191 In holding that a meaningful retrospective competency determination cannot be made in this case, the majority places great weight on the fact that there was no contemporaneous medical evidence presented at the retrospective competency hearing:
"[Although a competency evaluation may be made without a psychiatric or psychological evaluation,] [h]ere, however, the magistrate judge signed an order for a `determination of competency' to be performed at the Larned State Hospital, which would entail a psychiatric or psychological examination, or both. When a judge `finds that there is reason to believe that the defendant is incompetent to stand trial' (K.S.A. 22-3302[1]), finds that the competency concern is sufficient to warrant an order for a medical determination on the issue (K.S.A. 22-3302[3]), and the record is silent on why the judge did not pursue the medical determination, a retrospective judicial determination of competency based on no medical evidence whatsoever cannot stand."
I disagree with this conclusion for two reasons. First, as discussed above, the mere fact that a competency evaluation was ordered does not provide a sufficient basis to presume that the judge had reason to be concerned about the defendant's competency and, further, to presume that concern was sufficient to warrant an order for a psychiatric examination.
Second, in emphasizing the lack of medical evidence, the majority's ruling essentially eliminates the second and fourth McGregor factors and elevates the third factor to a threshold requirement in cases where a competency determination was ordered but did not occur and there is no contemporaneous medical evidence.
Those factors deserve full consideration. The second factor  the defendant's statements in the trial record  should be given great weight in this case, as there was overwhelming evidence of competency in the defendant's statements in the trial record.
As to the fourth factor  availability of testimony of witnesses who were in a position to interact with defendant before and during trial  the hearing was so confused and mishandled that very pertinent witnesses were not called, although presumably available.
The State did not subpoena any witnesses for the hearing, apparently because it believed the defendant had the burden of proof. The defense issued subpoenas for Brunson (the attorney who filed the motion to determine competency), Brown (the defendant's *192 trial attorney), and the trial judge, Judge Meeks. Service was had on Brown and Brunson; however, the subpoena for Judge Meeks was returned with no service. Then, a few days before the hearing, the defense attorney released Brown from his subpoena. It is not clear from the record why this was done.
The day of the hearing there was an issue about who had the burden of proof, and the court placed the burden on the State by instructing the prosecutor to go first and call witnesses. Because Brown had been released from appearing, Brunson was the only witness relevant to the competency issue who was present, so the State called him to testify.
From this record, it cannot be said with confidence that the lack of relevant witnesses was due to their unavailability; rather, it appears to have been the result of confusion over who had the burden of proof. The State, relying on the rule that the movant in a K.S.A. 60-1507 proceeding carries the burden of proof, was placed in the unfortunate position of having to go forward with whatever witnesses happened to be out in the hallway. See State v. Duke, 263 Kan. 193, 196, 946 P.2d 1375 (1997) (motion to correct illegal sentence is handled procedurally as a 60-1507 motion); Supreme Court Rule 183(g) (2005 Kan. Ct. R. Annot. 229) (60-1507 movant has the burden of proof).
Further, defense counsel's action in excusing the witness who would likely have had the most relevant testimony on the issue of the defendant's competency at the time of trial must weigh in the State's favor in considering this factor.
Although I would affirm the Court of Appeals' decision affirming the district court's denial of the motion to correct illegal sentence, the poorly coordinated manner in which the retrospective competency hearing occurred compels me to conclude that, alternatively, if any relief should be considered, the case should be remanded to the district court for another retrospective competency hearing with specific directions to determine, prior to the hearing, the availability of all relevant witnesses and which party bears the burden of proof, and to prepare accordingly.
However, there is another compelling reason why I disagree with the majority's reasoning and result. The linchpin of the majority's *193 decision is that the suspension of proceedings language of K.S.A. 22-3302(1) must be strictly and rigidly applied regardless of evidence in the record that the defendant repeatedly established his competence to stand trial.
For convenience, the statute is set forth at this point:
"At any time after the defendant has been charged with a crime and before pronouncement of sentence, the defendant, the defendant's counsel or the prosecuting attorney may request a determination of the defendant's competency to stand trial. If, upon request of either party or upon the judge's own knowledge and observation, the judge before whom the case is pending finds that there is reason to believe that the defendant is incompetent to stand trial the proceedings shall be suspended and a hearing conducted to determine the competency of the defendant." (Emphasis added.) K.S.A. 22-3302(1).
It is incongruous to strictly apply K.S.A. 22-3302 to conclude the order in this case deprived the court of jurisdiction to proceed when the order underlying that conclusion so utterly fails to conform to that same statute that it was not even capable of being carried out.
K.S.A. 22-3302(3) provides in pertinent part:
"The court may order a psychiatric or psychological examination of the defendant. To facilitate the examination, the court may: (a) If the defendant is charged with a felony, commit the defendant to the state security hospital or any county or private institution for examination and report to the court, or, if the defendant is charged with a misdemeanor, commit the defendant to any appropriate state, county or private institution for examination and report to the court, except that the court shall not commit the defendant to the state security hospital or any other state institution unless, prior to such commitment, the director of a local county or private institution recommends to the court and to the secretary of social and rehabilitation services that examination of the defendant should be performed at a state institution." (Emphasis added.)
The defendant was charged with felonies. By statute, the only state facility that could be lawfully ordered to conduct the examination was the Larned State Security Hospital. In the order, defense counsel designated the Larned State Hospital as the examining institution. This was appropriate only if the defendant was charged with a misdemeanor.
In its entirety, the order stated:

*194 "WHEREUPON the court, after finding no objection from the State, orders that a determination of competency to stand trial should be conducted at the Larned State Hospital to determine the same."
The magistrate judge lacked authority to sign such an order. The order did not request "a psychiatric or psychological examination" at the "Larned State Security Hospital" in accordance with the statute. Rather, the order directed the Larned State Hospital to determine competency rather than provide a report to the court. The Larned State Hospital had no authority under the order to accept the defendant into its facility or to perform any testing on him. The order was wholly out of compliance with the statute as to purpose and the correct institution. The order is a nullity. The majority applies rigid and strict construction of the suspension of proceedings language but applies no such construction to the order itself. The majority holds the entry of the invalid order and failure to suspend further proceedings based thereon deprived the court of jurisdiction to try the defendant. I strongly disagree. The trial court, the State, and all three defense counsel recognized the defendant was competent to stand trial and acted accordingly.
It is interesting that the matter of failure to hold a competency hearing did not surface until 2 years after the defendant's convictions  after the Court of Appeals affirmed his convictions on his direct appeal. The issue surfaced in the defendant's pro se motion to correct his sentence and a later pro se motion to correct sentence. His well-established competence continues.
I would affirm the district court and the Court of Appeals.
