
284 N.W.2d 877 (1979)
STATE of South Dakota, Plaintiff and Respondent,
v.
Gerald Ralph RIPPERGER, Defendant and Appellant.
No. 12601.
Supreme Court of South Dakota.
Submitted on Briefs September 19, 1979.
Decided November 7, 1979.
*878 John P. Guhin, Asst. Atty. Gen., Pierre, for plaintiff and respondent; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
David R. Gienapp of Arneson, Issenhuth & Gienapp, Madison, for defendant and appellant.
DUNN, Justice.
After serving sixteen days of a forty-five-day sentence on a conviction of driving while intoxicated, defendant's motion for suspension of the balance of his sentence was granted on the condition that he immediately pay his $300 fine and the witness costs of Dennis Hall in the amount of $412.48 within six months. Payment was to be made to Lake County, South Dakota. The court entered an order releasing defendant. Approximately one month later, defendant made a motion for amendment of the judgment, stating that the witness fee paid by the county to Mr. Hall was "contrary to the Laws of the State of South Dakota," and especially SDCL 19-5-1. The trial court denied the motion after a hearing. Defendant appeals from those portions of the judgment, order suspending balance of jail sentence and order denying amendment of judgment that required defendant to pay witness fees. We affirm.
Mr. Dennis Hall was called by the state as a material witness at trial. He was subpoenaed in Lake County, South Dakota. Prior to trial, however, he moved to Arizona, and it was necessary for him to travel from Arizona to appear at trial. The subpoena was not filed with the trial court until two months after trial.
Defendant's major contention is that SDCL 19-5-1 is the only statutory section applicable to the issue of whether Mr. Hall's total mileage costs are assignable to defendant. SDCL 19-5-1 provides that a witness is entitled to fifteen cents per mile one way from the point where the witness first entered the state. The state contends that SDCL 23-57-5,[1] which gives a court the power to impose any condition or restitution it wishes upon suspension of a sentence, allows payment of witness fees and mileage costs as a condition of suspension of sentence.
We believe defendant's argument implicitly rests upon the theory that a penal law should be strictly construed. South Dakota, however, has statutorily rejected the strict construction of penal statutes under the common law. See SDCL 22-1-1. Legislative intent must be determined by consideration of all pertinent statutes and cannot be a mechanistic application of only one statute.
The state's interpretation of SDCL 23-57-5 is correct. In State v. Long, 85 S.D. 431, 441, 185 N.W.2d 472, 477 (1971), the court in discussing SDCL 23-57-4[2] (the counterpart to SDCL 23-57-5) stated: "Probation is a matter of favor and to accomplish the purpose of the statute an exceptional degree of flexibility is essential. * * * Those costs, however, should not be excessive." Even though SDCL 19-5-1 appears to forbid payment of witness fees for mileage outside the state, the flexibility inherent in SDCL 23-57-5 allows such payment *879 if not excessive. We do not believe the fee here is excessive.
It is not important that the trial court cited no specific statutory authority for assigning the witness fees to defendant. This court has previously stated that if a trial court has an incorrect reason for its action, the action is still valid as long as it is, in fact, authorized by law. An action will not be found in error unless no correct reason exists. See State v. Marshall, 264 N.W.2d 911, 916 (S.D.1978); Owens v. City of Beresford, 87 S.D. 8, 18, 201 N.W.2d 890, 893 (1972).
Defendant's citation of State v. Hemmenway, 80 S.D. 153, 120 N.W.2d 561 (1963), as support for a strict application of SDCL 19-5-1 is not persuasive. In Hemmenway, the only issue faced by this court was whether a trial court was compelled to subpoena a defense witness at county expense for a second trial when the transcript of the first trial was available. The statement of the court indicating that only mileage costs for in-state travel would be compensable is dictum and inapplicable here because the court was not squarely presented with the question of compensability of mileage costs incurred outside the state. Hemmenway is authority, however, for the proposition that it makes no difference whether a witness was actually subpoenaed or not; an extension of this argument is applicable here, i. e., it makes no difference that the subpoena of Mr. Hall was not filed with the court until two months after trial. His mileage is compensable as long as he was a material witness.
The fact that witness Hall moved to Arizona after being subpoenaed but before trial is no reason to deny payment of mileage from Arizona to Lake County, South Dakota. The trial court has wide discretion when suspending sentence, and its discretion was not abused in awarding full mileage costs. There is nothing in the record to indicate Mr. Hall's move to Arizona was an attempt to "run up the bill," as it were. Failure to pay full mileage costs may have, in effect, restrained Mr. Hall from making a legitimate move. This is not a function of the criminal process.
Finally, defendant's citation to In re Stensland's Estate, 63 S.D. 204, 257 N.W. 129 (1934) is inapposite. That case was a civil action, not criminal.
The judgment and orders of the trial court are affirmed.
All the Justices concur.
NOTES
[1]  Repealed as of July 1, 1979, and reenacted with minor changes in wording as SDCL 23A-27-18.
[2]  Repealed as of July 1, 1979, and reenacted in substantial part as SDCL 23A-27-12 through 23A-27-16.
