
418 So.2d 948 (1982)
Orbey CHAMBERS, alias
v.
STATE.
3 Div. 541.
Court of Criminal Appeals of Alabama.
August 24, 1982.
On Return to Remand November 2, 1982.
*949 Harold L. Wilson, Hayneville, for appellant.
Charles A. Graddick, Atty. Gen., and Jeanne Weston, Asst. Atty. Gen., for appellee.
HARRIS, Presiding Judge.
Appellant was indicted for rape in the first degree in violation of Ala. Code § 13A-6-61 (Supp. 1977). At arraignment, in the presence of counsel, he pleaded not guilty. Upon conviction the trial court sentenced appellant as a recidivist under the Habitual Offender Act to life imprisonment. Appellant is represented by the same court-appointed counsel on this appeal as he was at trial and has been furnished with a free transcript.
The State's evidence affirmatively proves beyond any reasonable doubt that appellant was guilty as charged. Briefly stated, on May 25, 1981, appellant and two other men abducted the prosecutrix as she was walking toward the Jr. Food Store in Georgiana and drove her to a rural church in Butler County. There, in a wooded area beside the church, the prosecutrix's clothes were torn off and she was forcibly raped by each of the three black males, including appellant. The prosecutrix was certain appellant's penis had penetrated her vagina.
After appellant and the other two assailants had finished raping the prosecutrix, she was left naked in the woods near the church. She wandered for several hours in this condition until she was discovered by the police.
From the foregoing facts it is clear that the question of appellant's guilt was properly a question for the jury which they resolved. Law v. State, 407 So.2d 572 (Ala. Cr. App. 1981); Lyner v. State, 398 So.2d 420 (Ala. Cr. App. 1981); King v. State, 395 So.2d 489 (Ala. Cr. App. 1981).
Appellant contends that the prosecutrix, due to a mental defect, was incompetent to testify as a witness in this case. We disagree. Appellant objected to the prosecutrix's testifying at trial on the ground she was "not a competent witness," but made no request for the trial court to conduct an examination of her in accordance with Ala. Code § 12-21-165 (1975). Although the trial court did not conduct a separate examination to determine the prosecutrix's competency, the record affirmatively demonstrates that she was competent to testify.
Dr. Cynthia Clay, the prosecutrix's psychologist and director of the Butler-Crenshaw County Mental Health Centers, testified *950 that the prosecutrix did suffer a form of mental illness, but had received outpatient treatment and had shown definite improvement prior to being raped. The prosecutrix's mental condition had not required any type of institutionalization.
Dr. Clay examined the prosecutrix on May 26, 1981, and, in her opinion, the prosecutrix "was telling the truth" about being raped the day before. "[S]he showed me bruises that she had gotten. She described the incident to me." According to Dr. Clay, the prosecutrix went into "details" concerning the rapes and on later occasions repeated the "same details." Dr. Clay testified that the prosecutrix's consistency of details demonstrated that her story was truthful and not fabricated.
More importantly, however, a careful review of the prosecutrix's testimony in no way indicates that she was anything but competent to testify. Her answers to questions from the prosecution and the defense were clear and responsive. Her narrated account of the sequence of events which occurred from the time she was abducted until the police found her was lucid and detailed. She was positive in her identification of appellant as one of her three assailants. And her story did not vary under a thorough and sifting cross-examination. In short, the presumption of competence which the trial court afforded the prosecutrix is well supported by the record.
It is an elementary principle of law that a presumption of competency attends a witness and that the burden of proving incompetency is upon the party objecting. Smith v. State, 380 So.2d 345 (Ala. Cr. App. 1980). In order "to exclude a witness on the ground of mental or moral incapacity, the existence of the incapacity must be made to appear." Smith, 380 So.2d, at 347.
Whether a person's affliction with a mental defect is such as to incapacitate him to be a witness is a matter to be determined by the trial judge. C. Gamble, McElroy's Alabama Evidence, § 94.01(2) (3rd ed. 1977). In determining competency the trial judge is not bound by any hard and fast rule. Jolly v. State, 395 So.2d 1135 (Ala. Cr. App. 1981). The discretion of a trial judge as to the competency of a witness is of a well nigh irrevisable nature. Smith, supra.
After a careful examination of the record in this regard, we find that the trial court did not abuse its discretion in determining that the prosecutrix was competent to testify. Any error in the failure to conduct a separate examination to determine the prosecutrix's competency was harmless error at most in this case. ARAP, Rule 45.
Appellant also alleges that the trial court erred in refusing his written requested charges. There is no merit to this argument. Because appellant did not object to the judge's failure to give his written charges and state the grounds of his objection, any alleged error has not been preserved for review. Allen v. State, 414 So.2d 989 (Ala. Cr. App.), Affirmed, Ex parte Allen, 414 So.2d 993 (Ala. 1982); Samuel Blakely v. State, 418 So.2d 935 (Ala. Cr. App.) [Ms. 1 Div. 386, 1982].
At appellant's sentence hearing it was shown that, on July 12, 1979, prior to the instant conviction for rape, appellant pleaded guilty to three separate cases of forgery. Each of these three guilty pleas constitutes a separate felony conviction for purposes of the Habitual Offender Act. Watson v. State, 392 So.2d 1274, 1279 (Ala. Cr. App. 1980), cert. denied, 392 So.2d 1280 (Ala. 1981); Burgess v. State, 412 So.2d 298, 299 (Ala. Cr. App. 1982). As this court stated in Watson, supra, "all felonies come within the purview of the habitual offender statute regardless of their origin." 392 So.2d, at 1279.
Consideration of a defendant's prior convictions in sentencing him pursuant to the Habitual Offender Act does not give the act efficacy as a constitutionally prohibited ex post facto law, even though such prior convictions occurred before the effective date of the act. Ray v. State, 398 So.2d 774, 776 (Ala. Cr. App.), cert. denied, 398 So.2d 777 (Ala. 1981), and authorities cited therein. The important consideration is that, at the time appellant contemplated committing the instant felony, he was charged by law with knowledge that if he committed the felony he would be subject *951 to punishment under the Habitual Offender Act. Coker v. State, 396 So.2d 1094 (Ala. Cr. App. 1981).
Thus, it was proper for the trial court to consider appellant's three prior guilty pleas as three separate felony convictions for the purposes of sentencing him as a recidivist.
Under the mandatory requirements of the Habitual Offender Act, however, this case must be remanded and appellant sentenced to life without parole rather than life imprisonment. Rape in the first degree is a Class A felony. Ala. Code § 13A-6-61(b) (Supp. 1977). Ala. Code § 13A-5-9(c)(3) (Supp. 1981) mandates that:
"In all cases when it is shown that a criminal defendant has been previously convicted of any three felonies and after such convictions has committed another felony, he must be punished as follows:... (3) On conviction of a Class A felony, he must be punished by imprisonment for life without parole."
For the reasons set out in Mack Aplin v. State, (Ala. Cr. App.) [Ms. 4 Div. 893, December 29, 1981] and in Harry Peoples v. State, 415 So.2d 1230 (Ala. Cr. App.), [1982], we remand this cause to the trial court for proper sentencing under the Habitual Offender Act.
All parties should be present, with counsel, and any evidence offered shall be recorded for this court's review. A complete transcript of these proceedings shall be transmitted to this court under Aplin, supra, and Peoples, supra.
AFFIRMED, BUT REMANDED WITH DIRECTIONS.
All the Judges concur.

ON RETURN TO REMAND
This case was remanded to the Circuit Court of Butler County, Alabama, for a new sentencing hearing. In strict compliance with the order of this court a new sentencing hearing was set at which appellant and his counsel were present. The state introduced into evidence three certified copies of the judgments of conviction showing that appellant had been previously convicted of three forgery cases, after which the court sentenced the appellant to life imprisonment without parole under the provisions of Section 13A-5-9(c)(3) (Supplement 1981) which mandates that:
"In all cases when it is shown that a criminal defendant has been previously convicted of any three felonies and after such convictions has committed another felony, he must be punished as follows:... (3) On conviction of a Class A felony, he must be punished by imprisonment for life without parole."
A supplemental transcript showing this re-sentencing, including the certified copies of the previous convictions, was filed in this court.
Upon consideration of the supplemental transcript which includes the three certified copies of the three previous felony convictions, this case is affirmed.
AFFIRMED.
All the Judges concur.
