
825 P.2d 676 (1991)
STATE of Utah, Plaintiff and Appellee,
v.
David MONTOYA, Defendant and Appellant.
No. 900319-CA.
Court of Appeals of Utah.
December 31, 1991.
*677 Jose Luis Trujillo, Salt Lake City, for defendant and appellant.
R. Paul Van Dam and Judith S.H. Atherton, Salt Lake City, for plaintiff and appellee.
Before BENCH, GARFF, and JACKSON, JJ.

OPINION
GARFF, Judge:
On November 23, 1988, David Montoya was convicted of attempted rape, a second degree felony, in violation of Utah Code Ann. §§ 76-4-102 and 76-5-402 (1990). He now appeals his conviction. We dismiss the appeal for lack of jurisdiction.
On December 15, 1988, a document entitled "Judgment, Sentence, and Commitment to Utah State Prison" was entered wherein Montoya was sentenced to a term *678 of one to fifteen years. Montoya did not file an appeal within the statutory period after he was sentenced. However, apparently, in order to afford Montoya an enlargement of time to appeal his sentence, the State stipulated with Montoya to a resentencing.[1] Pursuant to the stipulation, he was resentenced on May 14, 1990 so that he could timely appeal.[2]
Montoya filed his notice of appeal on June 12, 1990, wherein he stated he was appealing "the decision made May 14, 1990 and the underlying conviction of attempted conviction of rape." He challenges his conviction and sentencing claiming (1) the court erred by failing to appoint an alienist[3] prior to sentencing, pursuant to Utah Code Ann. § 77-16-2 (1980); (2) his counsel was inadequate because (a) he failed to petition for a competency hearing prior to trial, and (b) he failed to move that an alienist examine Montoya; and (3) the court erred by failing to disqualify a juror. We note that issue (1) pertains to Montoya's sentence, and issues (2) and (3) pertain to his conviction.

TIMELY APPEAL
We first consider whether the appeals from the conviction and the sentence were timely filed.
In an appeal permitted as a matter of right, the notice must be filed within thirty days "after the date of entry of the judgment or order appealed from." Utah R.App.P. 4(a). Here, the notice of appeal was filed well over a year after Montoya's conviction and sentence. The time for filing an appeal is jurisdictional and ordinarily cannot be enlarged. State v. Johnson, 635 P.2d 36, 37 (Utah 1981); State v. Boggess, 601 P.2d 927, 928-29 (Utah 1979).[4]
In Johnson, the court stated by way of dicta that postconviction proceedings "could be used, in carefully limited circumstances, to modify or vacate a judgment where extra-record facts showed that the defendant had been deprived of his constitutional right to a fair trial, including the right to the assistance of counsel." Id. at 38. The supreme court relied on People v. Callaway, 24 N.Y.2d 127, 299 N.Y.S.2d 154, 247 N.E.2d 128 (1969) which suggests that the purpose of the postconviction hearing is to determine whether the defendant
was induced, by reason of that representation, to allow his time to take an appeal to expire or that he was misled as to his right to appeal, he should  in accordance with the procedure we have adopted  be resentenced nunc pro tunc upon the previous finding of guilt so as to afford him "an opportunity of prosecuting and perfecting an appeal, since the time for taking such appeal would date from the rendition of the new judgment."
Id. 299 N.Y.S.2d at 156, 247 N.E.2d at 130 (quoting People v. Hairston, 10 N.Y.2d 92, 94, 217 N.Y.S.2d 77, 78, 176 N.E.2d 90, 91 (1961)).
*679 Here, nothing indicates the resentencing was conducted pursuant to Utah R.Civ.P. 65B(i) or that findings were made pursuant to Johnson. In fact, it appears that a hearing was not even held. Only an order was entered imposing the same sentence as before, except giving credit for time served. It appears the only purpose of the order was to open the door to an appeal even though the statutory period had long since passed. We find no merit to this procedure and deem such manipulation of the judicial system highly inappropriate. If the defendant has a legitimate claim that his constitutional right to a fair trial was violated because he was denied effective assistance of counsel, he should follow the procedures under Rule 65B(i) as outlined in Johnson.
Giving defendant the benefit of the doubt, we are presented here with an appeal of a resentencing, presumably pursuant to Utah R.Crim.P. 22(e), which allows for correction of an illegal sentence. We therefore limit our review to the sentence and decline to even consider the conviction because it is not appropriately before us.

JURISDICTION
To determine whether Montoya's appeal of his resentencing is properly before this court, we must determine whether the initial sentence was valid. If it was valid, the trial court would have had no further subject matter jurisdiction to resentence Montoya. Likewise, this court would have no jurisdiction to hear the appeal. Because the issue goes to jurisdiction, this court can raise the issue sua sponte and at any time. Crump v. Crump, 821 P.2d 1172, 1173-74 (Utah App. 1991).
The Utah Supreme Court has recognized the "continuing jurisdiction of a trial court to correct an illegal sentence." State v. Babbel, 813 P.2d 86, 88 (Utah 1991). Because an illegal sentence is void, the court does not lose jurisdiction over the sentence until that sentence has been corrected. Id. The negative implication of this principle is also spelled out in Babbel. Once a court imposes a valid sentence, it loses subject matter jurisdiction over the case. Id. (citing State v. Lee Lim, 79 Utah 68, 74, 7 P.2d 825, 827 (1932)). Thus, the district court's jurisdiction over the resentencing turns on whether the initial sentence was legal.
A court can correct an illegal sentence at any time. Utah R.Crim.P. 22(e) (1991); Babbel, 813 P.2d at 87; Lee Lim, 79 Utah at 74, 7 P.2d at 826-27. We review the appropriateness of a resentencing by determining whether the court clearly erred in failing to comply with Utah Code Ann. §§ 77-16-1 and -2 at the time of the original sentence. Babbel, 813 P.2d at 86; State v. Babbell, 770 P.2d 987, 993 (Utah 1989).
Utah Code Ann. § 77-16-1 (1990) requires the following:
Whenever any person is convicted of or pleads guilty to rape ... or an attempt to commit [rape], and when it appears to the court either upon its own observation or upon evidence otherwise presented, that the defendant may be suffering from any form of mental disease or defect which may have substantially contributed to the commission of the offense, the court shall order a mental examination of that person.
As to the mental examination itself, Utah Code Ann. § 77-16-2 (1990) requires that it be conducted "by two or more alienists appointed by the judge."
In reviewing the judge's decision not to appoint an alienist, we use a clearly erroneous standard to review the findings on the factors outlined in the statute. State v. DePlonty, 749 P.2d 621, 627 (Utah 1987);[5] Utah R.Civ.P. 52(a). We review the ultimate conclusion based on those findings for correctness. DePlonty, 749 P.2d at 627; West Valley City v. Majestic Inv. Co., 818 P.2d 1311, 1313 (Utah App. 1991).
*680 Here, the court made no explicit findings as to the statutory factors. In such cases, "we `assume that the trier of facts found them in accord with its decision, and we affirm the decision if from the evidence it would be reasonable to find facts to support it.'" State v. Ramirez, 817 P.2d 774, 787 (Utah 1991) (quoting Mower v. McCarthy, 122 Utah 1, 6, 245 P.2d 224, 226 (1952)). Therefore, because the court did not appoint an alienist, we assume the court found that Montoya was not suffering from a mental disease or defect which may have substantially contributed to the commission of the offense.
Accordingly, the first issues in determining whether the court clearly erred in its findings supporting its refusal to appoint an alienist in the initial sentencing are (1) whether, from the evidence or from the court's observation, Montoya may have been suffering from a mental disease or defect; and (2) whether the mental disease or defect may have substantially contributed to the commission of the crime.
In analyzing the statute, we note the combination of mandatory and permissive language. That is, the statute requires that, where circumstances suggest a possibility that a defendant has a mental disease or defect, and where circumstances suggest that the mental disease or defect may have substantially contributed to the commission of the crime, "the court shall order a mental examination of that person." Utah Code Ann. § 77-16-1 (1990) (emphasis added). Accord DePlonty, 749 P.2d at 625.
As to the trial itself, Montoya testified on his own behalf. He was subjected to direct, cross, and redirect examination. The transcript reveals he was coherent. He said nothing about a mental disease or defect, nor did his counsel elicit any information or behavior suggesting one. While his testimony differed from that of the victim, his answers pertained to the questions posed. His appropriate reference to her testimony during his own evidences his ability to track the victim's testimony. In short, neither the evidence produced at trial nor Montoya's demeanor during the trial should have caused the court to find that Montoya may have suffered from a mental disease or defect.
After the verdict was read, the following conversation ensued:
MR. POORMAN: Your Honor, it's my client's desire to request a pre-sentence report in this matter. Mrs. Garner's indicated to me a date of December 12th, that she could have that report prepared by then.
We would also request of the Court a court order with regards to a psychological examination of Mr. Montoya while he stays at  pending that pre-sentence report by Mrs. Garner.
THE COURT: Any objection to that, Mr. Heward?
MR. HEWARD: No, Your Honor.
THE COURT: All right. So ordered. Do you need a special order on that, Debbie, or do you make arrangements?
MS. GARNER: Are you going to use alienists or are you going to use 
THE COURT: I think probably that might be preferable.
MS. GARNER: Can they get it done? I mean, can they see him? What  I think, if I may express myself, he needs or wants treatment or at least to be seen by somebody right now. He's really concerned about his  about his well-being.
THE COURT: Well, rather than doing it on a formal basis and to appoint an alienist, why don't we just refer the matter to Weber County Mental Health and let's have someone from Mental Health come over and visit with him.
MR. POORMAN: That will be fine, Your Honor.
THE COURT: Why don't we do this. Let's contact Steve Watson and just explain that they're not  they're not only concerned about the sentence, but the defendant apparently is having some problems. So we'll have Mr. Watson or someone from his office come over and speak to him.
In response to the court's request, Steven Watson, a clinical social worker from Weber County Mental Health, visited with Montoya and filled out an assessment form as follows:

*681 At request of Judge Taylor subject seen. Mental status: Orient X 3 clear stream of thought. Makes some suggestion of hallucination but genuineness is questionable. Wants sleeping or nerve pills. If continues in jail here, evaluate further in a week.
As to this postverdict colloquy, the only evidence of a mental disease or defect relates to the comments of Montoya's counsel, those of the AP & P officer, and the one-paragraph report from the Weber County Mental Health social worker. Specifically, the AP & P officer mentioned that Montoya was concerned "about his well-being" at the present time, and that he wanted treatment. The social worker questioned the genuineness of Montoya's suggestion that he was hallucinating.
The evidence just described goes only to Montoya's current state of mind during the trial and shortly after. It does not go to Montoya's state of mind during the commission of the crime, nor does it suggest that any such mental disease or defect "may have substantially contributed to the commission of the offense." Thus, the court did not clearly err in refusing to make such a finding. Accordingly, the statute was never triggered and the initial sentence was therefore valid.[6]
Because any jurisdiction to resentence Montoya would have to have been based on an illegality or voidness in the initial sentence, and because the initial sentence was legal, the district court lost subject matter jurisdiction over Montoya's sentence. Consequently, this court has no jurisdiction and we are therefore required to dismiss the appeal.
Dismissed.
BENCH and JACKSON, JJ., concur.
NOTES
[1]  The only document in the record suggesting the basis for resentencing is a letter written by the court to defense counsel:

In response to your inquiry of April 19, 1989 I did not order an evaluation at the State Hospital. I did recommend to the prison authorities that they evaluate him for possible hospitalization.
If Mr. Montoya wishes to file an appeal, the State seldom objects to a resentencing for that purpose and it seems probable we could accommodate such a request.
I have also enclosed a copy of his letter to me and hope you may address with him some of his concerns.
[2]  In State v. Johnson, 635 P.2d 36 (Utah 1981) the court, by way of dicta, suggests that a defendant who requests his or her attorney to file an appeal within the statutory thirty-day limit, and whose attorney fails to do so, may file a motion for postconviction relief pursuant to Utah R.Civ.P. 65B(i). If the court thereupon finds defendant's position meritorious, then resentencing would be appropriate in order to afford him an opportunity to appeal. Id. at 38.
[3]  "A seldom used term meaning one who has specialized in the study of mental diseases. Persons qualified by experience, knowledge, and previous opportunities to express opinion as to defendant's mental condition at a particular time." Black's Law Dictionary 67 (5th ed. 1979).
[4]  For example, Rule 4(e) of the Utah Rules of Appellate Procedure allows a trial court the discretion to extend the time for filing by thirty days.
[5]  The language of DePlonty is potentially confusing: "On appeal, we do not disturb the conclusions of the trier of fact unless they are clearly erroneous. Utah R.Civ.P. 52(a) (1987)." 749 P.2d at 627 (emphasis added). This passage refers to findings of fact despite usage of the word "conclusions." This interpretation is borne out by the reference to the "trier of fact" and by the cite to Utah R.Civ.P. 52(a) which specifically applies to findings of fact.
[6]  Montoya would have us consider a presentence report completed December 2, 1988. This report is not part of the appellate record, and its authenticity cannot be verified. Therefore this court cannot consider it. Even so, we see nothing in the report which would support a finding that any mental disease or defect may have substantially contributed to the commission of the offense.
