
247 Cal.App.2d 133 (1966)
J. M. MEYER, Petitioner,
v.
THE SUPERIOR COURT OF SACRAMENTO COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Civ. No. 719. 
California Court of Appeals. Fifth Dist.  
Dec. 9, 1966.
 Lionel K. Hvolboll for Petitioner.
 No appearance for Respondent.
 Thomas C. Lynch, Attorney General, Doris H. Maier, Assistant Attorney General, and Stephen Cooper, Deputy Attorney General, for Real Party in Interest.
 GARGANO, J.
 Petitioner seeks a writ of mandate to compel the Superior Court of Sacramento County to hear, on the merits, his application under Penal Code section 17, to declare the offense for which he was convicted to be a misdemeanor.
 On July 22, 1960, petitioner pleaded guilty to writing checks drawn on insufficient funds in violation of Penal Code *135 section 476a. At that time his conviction was punishable by imprisonment in the state prison or in the court's discretion, by imprisonment in the county jail. On August 5, 1960, the Honorable Fred R. Pierce, then Judge of the Superior Court of Sacramento County, suspended the pronouncement of judgment and sentence for a period of three years  [fn. 1] and placed petitioner on probation.  [fn. 2]
 On September 30, 1963, Penal Code section 17 was amended to empower a court which grants probation for an offense punishable by imprisonment in the state prison or by imprisonment in the county jail, without pronouncing judgment and/or without imposing sentence, to at that time or at any time "thereafter" declare the offense to be a misdemeanor.  [fn. 3] On December 19, 1963, approximately three years after his conviction, petitioner, who had apparently satisfactorily completed the terms of his probation, was permitted to withdraw his plea of guilty and the record was expunged pursuant to Penal Code section 1203.4. Accordingly, petitioner was released from all penalties and disabilities resulting from the conviction, with the exception of the right to possess or have in his custody or control any firearm capable of being concealed on his person.  [fn. 4] No further proceedings were had until June 14, 1966, when petitioner, who was then engaged in an occupation requiring the possession of a concealable weapon, moved the respondent court to declare his offense a misdemeanor under Penal Code section 17 as amended in 1963. The court, while *136 indicating for the record that it was inclined to grant the petitioner's motion, denied the motion on the ground that the court lacked the power to apply section 17 retroactively. Petitioner then filed this petition for writ of mandate to compel the court to decide his motion on the merits.
 Respondent does not deny that a trial court is under a duty to hear and determine on the merits all matters which are properly before it, and within its jurisdiction. (Robinson v. Superior Court, 35 Cal.2d 379 [218 P.2d 10].) It also apparently concedes that mandamus is the proper remedy to compel it to act if it erroneously refuses to exercise jurisdiction. (St. James Church v. Superior Court, 135 Cal.App.2d 352 [287 P.2d 387].) It asserts, however, that it is without power to declare petitioner's conviction to have been a misdemeanor because the 1963 amendment to Penal Code section 17 cannot be applied retroactively, and the rationale of In re Estrada, 63 Cal.2d 740 [48 Cal.Rptr. 172, 408 P.2d 948], does not apply to the facts of this case.
 Respondent, apparently relying on People v. Banks, 53 Cal.2d 370 [1 Cal.Rptr. 669, 348 P.2d 102], seems to assume that the superior court's act of suspending petitioner's sentence in 1960 had the effect of causing petitioner's offense to retain its status as a felony without possibility of later reclassification. The thrust of its argument is that when the court acted in 1960 it lacked the power (later created by the amendment) to declare the offense a misdemeanor, and to hold now that the power applies to petitioner would be to change the character of the action taken by the court in 1960, and would violate the expressed principle of non-retroactivity as set forth in Penal Code section 3.  [fn. 5]
 [1a] We do not find it necessary to decide whether Penal Code section 3 prohibits a retroactive application of section 17 as amended in 1963, for we do not believe that the facts of this case require such a retroactive application. The petitioner had not yet completed his probationary period when section 17 was amended, and he was still under the jurisdiction of the trial court, not only in relation to his probationary status but also in relation to the character of the offense of which he has been convicted. This is true because even without the 1963 amendment the trial court could have changed the character of his offense by revoking probation and by imposing a jail sentence or a fine. (People v. Lippner, 219 Cal. 395 [26 P.2d 457].) *137
 In this state it is clear that if a penal statute does not characterize the crime as either felony or misdemeanor but specifies a punishment, the punishment becomes the test. If the statute calls for imprisonment in the state prison the offense is a felony. If the offense calls for imprisonment in the county jail or a fine it is a misdemeanor (Pen. Code,  17; 1 Witkin, Cal. Crimes (1963)  39, p. 42.) [2] It is also clear that when a crime is punishable by imprisonment in the state prison, or in the discretion of the court by imprisonment in the county jail, the actual punishment ordered is the test. (See 1 Witkin, Cal. Crimes (1963)  40, p. 43 and cases cited.) Thus, no problem is presented when sentence is actually imposed, even though the defendant is granted probation. [3] A problem arises, however, in those cases where the offense is alternatively a felony or misdemeanor (depending upon the sentence) and the court suspends the pronouncement of judgment and/or the imposition of sentence and grants probation. It is in this class of cases that the decisions hold that the offense shall be regarded as a felony for all purposes until judgment, and if no judgment is pronounced it remains a felony. (People v. Banks, supra, 53 Cal.2d 370; People v. Williams, 27 Cal.2d 220 [163 P.2d 692]; People v. Lippner, supra, 219 Cal. 395; In re Rogers, 20 Cal.App.2d 397 [66 P.2d 1237].)
 We agree with the respondent's position that when Penal Code section 17 was amended in 1963, petitioner stood convicted of a felony. The conviction was punishable by imprisonment in the state prison or, in the discretion of the court, by imprisonment in the county jail; and up to the time of the amendment no further action had been taken by the court. The fallacy of respondent's argument, however, is in the assumption that the trial court's act in suspending imposition of sentence had the effect of causing the crime to retain its status as a felony without possibility of later reclassification. In other words, in arguing its position against a retroactive application of section 17 as amended, respondent seems to assume that prior to the amendment a trial court which suspended imposition of sentence for an offense punishable by imprisonment in the state prison or by imprisonment in the county jail irrevocably fixed the character of the offense and subsequent reclassification was impossible. As we shall see from the cases already cited, this was not the rule.
 In Lippner, the defendant had pleaded guilty to three separate and distinct felonies, each punishable by imprisonment *138 in the state prison or, in the court's discretion, by imprisonment in the county jail. The trial court suspended judgment and imposition of sentence and placed defendant on probation for a period of five years. After defendant had been on probation for approximately four years and had failed to make the court-ordered restitution, the court revoked the probation and sentenced defendant to imprisonment in the county jail. The court held that since the trial court had the power to fix the term of probation for five years, it had acted within its jurisdiction when it pronounced judgment within that period by sentencing defendant to the county jail, thus making the offense of which defendant was guilty a misdemeanor instead of a felony.
 In Rogers at page 400 the court used this significant language: "The necessary inference to be drawn from the language of section 17 of the Penal Code that 'when a crime, punishable [by imprisonment in the state prison, is also punishable] by fine or imprisonment in a county jail, in the discretion of the court, it shall be deemed a misdemeanor for all purposes after a judgment imposing a punishment other than imprisonment in the state prison,' is that the offense remains a felony except when the discretion is actually exercised and the prisoner is punished only by a fine or imprisonment in the county jail."  [fn. 6]
 In Banks, the court held that a person stands convicted of a felony for all purposes if said person was convicted of an offense punishable by imprisonment in the state prison or by imprisonment in the county jail and if said person's offense was suspended by the trial court. However, the court also indicated clearly that the character of the offense could be changed to a misdemeanor by the subsequent imposition of a jail sentence or fine. As a matter of fact, in footnote 7 of page 382 of the opinion, the court, citing People v. Lippner, had this to say: "Where imposition of sentence is suspended the court can set the term of probation at the maximum possible felony term, and it can subsequently revoke probation and pronounce a misdemeanor sentence after expiration of the maximum misdemeanor term."
 From the foregoing case, it is evident that when section 17 was amended in 1963 the trial court already had the power to change the character of the petitioner's conviction from a felony to a misdemeanor by revoking his probation and imposing *139 a jail sentence. Consequently, it is also evident that the 1963 amendment simply implemented a power which already existed in the trial court, and that it can apply to the defendant who was still on probation without changing the character of the action taken by the court in 1960 in any sense of the word.
 [1b] We also agree with respondent that the facts of this case are distinguishable from the facts of In re Estrada, supra, 63 Cal.2d 740. The rationale of Estrada, however, is that Penal Code section 3 is a general rule of construction coming to us from the common law and that in interpreting a penal statute the intent of the Legislature is still a controlling factor. In this latter sense, therefore, the problem here is the same as faced by the court in Estrada, viz., to try to ascertain the legislative intent. We, therefore, resort to principles of statutory construction for the answer.
 In order to ascertain the legislative intent we may look to the purpose of the statute and what it seeks to accomplish. Moreover, a statute should be given a reasonable interpretation which is consistent with the dictates of justice and which avoids absurd results. (Artukovich v. Astendorf, 21 Cal.2d 329 [131 P.2d 831], In re Haines, 195 Cal. 605 [234 P. 883].) [4] The apparent purpose of the 1963 amendment was to implement the power of a trial court, when it suspends imposition of sentence, to enable the court to either immediately declare that the offense is a misdemeanor or to wait until the probationary period has been satisfactorily completed before doing so. In other words, it simply eliminates the artificial distinction which existed prior to its enactment and makes it possible for the court to reduce a felony to a misdemeanor without the necessity of imposing a jail sentence. [1c] To admit that the superior court had the power prior to the 1963 amendment to change the character of an offense from felony to misdemeanor by the simple expediency of imposing a jail sentence even for a person who violated his terms of probation, and to hold that the Legislature did not intend the amendment to apply to a person who on its effective date was already on probation and "thereafter" satisfactorily fulfilled the terms thereof, would not only distort the legislative intent but would create an absurdity.
 [5] The remaining question is whether the petitioner is barred from making application under section 17, as amended, since (a) his probationary period has expired and (b) his *140 record was expunged under Penal Code section 1203.4. We think not.
 (a) The word "thereafter" in Penal Code section 17 is not followed by a time limit, nor is it by express terms restricted to the probationary period. Moreover, in conferring upon the court the power to declare an offense to be a misdemeanor after it has suspended imposition of judgment or sentence, the Legislature evidently intended to enable the court to reward a convicted defendant who demonstrates by his conduct that he is rehabilitated. Thus, the word "thereafter" should not be unduly restricted to the probationary period for there is even greater reason for rewarding a convicted defendant who continues to demonstrate his rehabilitation long after his probation has expired, when he is no longer under the constant supervision of a probation officer.
 (b) The expungement of the record under section 1203.4 is also a reward for good conduct and has never been treated as obliterating the fact that the defendant has been convicted of a felony. As stated by the court in In re Phillips, 17 Cal.2d 55, 61 [109 P.2d 344, 132 A.L.R. 644]: "... The power of the court to reward a convicted defendant who satisfactorily completes his period of probation by setting aside the verdict and dismissing the action operates to mitigate his punishment by restoring certain rights and removing certain disabilities. But it cannot be assumed that the legislature intended that such action by the trial court under section 1203.4 should be considered as obliterating the fact that the defendant had been finally adjudged guilty of a crime. ..."
 Therefore, a conviction which has been expunged still exists for limited purposes, including, among others, evidentiary use at a later trial (People v. Banks, supra, 53 Cal.2d 370) and the denial of the right to carry a concealable weapon (Pen. Code,  1203.4). Consequently, petitioner should not be barred from pursuing a more suitable remedy, particularly where the final decision as to whether he is worthy rests within the sound discretion of the superior court.
 It is accordingly ordered that a peremptory writ of mandate issue requiring the Superior Court of the County of Sacramento to hear on the merits petitioner's motion to declare the offense of which he was convicted on July 22, 1960, to be a misdemeanor.
 Conley, P. J., and Stone, J., concurred.
 "It is further ordered that the basis of judgment and sentence be suspended for a period of three (3) years, and"
 "It is further ordered that defendant J. M. Meyer be confined in the Sacramento County Jail for the term of three (3) months, and said period of confinement constitute the first three (3) months of this order of probation, and it is further ordered that defendant J. M. Meyer make arrangements with the probation officer of Sacramento County to make restitiution."
NOTES
[fn. 1]  1. Thereafter, petitioner's probation period was extended to August 5, 1964, in order to enable petitioner to complete restitution, a condition of his probation.
[fn. 2]  2. The court's order read as follows:
[fn. 3]  3. The 1963 amendment reads as follows "Where a court grants probation to a defendant without imposition of sentence upon conviction of a crime punishable in the discretion of the court by imprisonment in the state prison or imprisonment in the county jail, the court may at the time of granting probation, or, on application of defendant or probation officer thereafter, declare the offense to be a misdemeanor."
[fn. 4]  4. Section 1203.4 was amended September 15, 1961, and the following language was added: "Dismissal of an accusation or information pursuant to this section does not permit a person to own, possess or have in his custody or control any firearm capable of being concealed upon the person or prevent his conviction under Section 12021."
[fn. 5]  5. Penal Code section 3, referring to the Penal Code, reads: "No part of it is retroactive, unless expressly so declared."
[fn. 6]  6. This language was quoted with approval in People v. Williams, supra, 27 Cal.2d 220.
