In all cases when it is shown that a criminal defendant has been previously convicted of any felony and after such conviction has committed another felony, he must be punished as follows: (1) On conviction of a Class C felony, he must be punished for a Class B felony; (2) On conviction of a Class B felony, he must be punished for a Class A felony; and (3) On conviction of a Class A felony, he must be punished by imprisonment for life or for any term of not more than 99 years but not less than 15 years. (Acts 1977, No. 643, p. 1091.)