
22 Kan. App.2d 794 (1996)
923 P.2d 1044
STATE OF KANSAS, Appellee,
v.
HILLIS B. KRUMROY, Appellant.
No. 72,934.
Court of Appeals of Kansas.
Opinion filed August 23, 1996.
Jean K. Gilles Phillips, assistant appellate defender, Jodi Rosenberg, student intern, and Jessica R. Kunen, chief appellate defender, for the appellant.
Doyle Baker and David Lowden, assistant district attorneys, Nola Foulston, district attorney, and Carla J. Stovall, attorney general, for the appellee.
Before GERNON, P.J., MARQUARDT, J., and STEPHEN D. HILL, District Judge, assigned.
GERNON, J.:
Hillis B. Krumroy was convicted by a jury of criminal nonsupport of a child in violation of K.S.A. 21-3605. He was originally sentenced to a term of 1 to 5 years and then placed on 5 years' probation. However, Krumroy filed a motion objecting to being placed on probation, and the trial court resentenced him to serve a 1- to 5-year term in the custody of the Secretary of Corrections. The Kansas Sentencing Guidelines Act (KSGA) sentence was computed to be 6 months' imprisonment and 12 mouths' postrelease supervision. Krumroy appeals from his conviction and sentence.
Krumroy was married to Nan Krumroy in 1967 and was divorced from her in 1986. As a result of the marriage, two children were born.
*795 Krumroy holds a bachelor's degree in business and a master's degree in accounting. Prior to the divorce, he had apparently been steadily employed and held several accounting jobs for various employers.
In 1986, Krumroy moved to the state of California. In that year, he paid $1,800 in child support; he paid $2,400 in 1987; and he paid $50 in 1988. Since 1988, defendant has made no effort to support his children.
The mother of the children did the best she could to provide all of their support. She worked as a school teacher and supplemented that salary with second and third jobs. In most instances, her additional jobs required her to work after school, on Saturdays, and in the evenings.
In 1990, a complaint was filed charging Krumroy with nonsupport of his daughter from December 1, 1988, to November 1, 1990. Prior to the trial of this matter, the complaint was amended to allege that the nonsupport continued through August 15, 1994.
Krumroy was arrested in California in 1994 and was returned to Kansas for trial. At the time of his arrest, he was living in his car and was rummaging through a trash dumpster for recyclables. He testified that he began living in his car in 1993 and that his annual income was $5,000, mostly as an "ecology specialist," collecting aluminum cans and other recyclables.
While in California, Krumroy suffered an eye injury while working on the production line in a book bindery. He received workers compensation for some period of time. He also developed cataracts and had surgery at a VA hospital.
A court-appointed psychologist testified that she had diagnosed Krumroy with bipolar disorder, more commonly known as manic depression. Krumroy told this psychologist that he could not use his degree to work because "Filipinos are flooding the market," and working for lower wages and, as a result, there were no jobs left for him.
Krumroy raises several issues on appeal.

IMPRISONMENT FOR DEBT Krumroy argues that K.S.A. 21-3605 violates the prohibition *796 against imprisonment for debt found in the Kansas Constitution Bill of Rights. We disagree.
Article 16 of the Bill of Rights to the Kansas Constitution provides: "No person shall be imprisoned for debt, except in cases of fraud."
The State does not argue that the constitutional provision quoted above prohibits imprisonment for the failure to pay debt in the absence of fraud. The State argues that under the circumstances shown in this case, Krumroy was not imprisoned for debt.
We agree with the State. Krumroy's argument is without merit. In State v. Jones, 242 Kan. 385, 389-90, 748 P.2d 839 (1988), our Supreme Court indicated the following concerning constitutional guarantees against imprisonment for debt:
"Constitutional guarantees against imprisonment for debt have as their purpose the prevention of the useless and often cruel imprisonment of persons who, having honestly become indebted to another, are unable to pay as they undertook and promised. The spirit of such a provision is to protect an honest debtor who is poor and has nothing with which to pay so that he should not be at the mercy of his creditors if his insolvency is bona fide, but it is not intended to shield a dishonest man who takes unconscionable advantage of another. 16A Am. Jur.2d, Constitutional Law § 619, p. 569."
The Kansas Supreme Court in In re Wheeler, Petitioner, 34 Kan. 96, Syl. ¶ 1, 8 Pac. 276 (1885), construed the constitutional provision in question as follows: "The provision of the constitution declaring that `no person shall be imprisoned for debt, except in cases of fraud' applies only to liabilities arising upon contract."
The obligation of a parent to support his or her children does not arise on contract. It arises because of a duty imposed by the common law and by society upon all parents to support their children. The failure to fulfill that obligation is not the failure to pay a. debt in the sense that term is used in our constitution.
The interpretation of a criminal statute is a question of law over which we have unlimited review. State v. Craig, 254 Kan. 575, 578, 867 P.2d 1013 (1994). "A statute is presumed constitutional and all doubts must be resolved in favor of its validity. If there is any reasonable way to construe a statute as constitutionally valid, the court must do so. A statute must clearly violate the constitution *797 before it may be struck down." State v. Scherzer, 254 Kan. 926, Syl. ¶ 6, 869 P.2d 729 (1994).
"This court not only has the authority, but also the duty, to construe a statute in such a manner that it is constitutional if the same can be done within the apparent intent of the legislature in passing the statute." State v. Durrant, 244 Kan. 522, 534, 769 P.2d 1174, cert. denied 492 U.S. 923 (1989).
Krumroy cites us no instance in which a court has held that the imprisonment of a parent for nonsupport violates constitutional proscriptions against imprisonment for debt. Indeed, virtually all of the decisions on this subject have rejected his argument. There are a number of such decisions written many years ago. We do not consider the age of these decisions as diminishing their value.
The Kansas Supreme Court decided this issue in Wheeler. Wheeler was a proceeding wherein the father of an illegitimate child was jailed for not supporting his child. He argued that his incarceration violated Article 16 of the Bill of Rights to the Kansas Constitution. The Supreme Court disagreed and held: "The charge of maintenance and education which the father of an illegitimate child may be adjudged to pay under the bastardy act, is not a debt in the sense in which that term is used in the provision of the constitution forbidding imprisonment for debt." 34 Kan. 96, Syl. ¶ 3.
It is true that Wheeler is not directly on point. However, Krumroy is imprisoned for failing, without lawful excuse, to maintain and educate his child. The basis upon which the imprisonment is imposed under 21-3605 is the same basis on which Wheeler was placed in jail. Therefore, we consider Wheeler to be authority to support our decision that 21-3605 does not violate the constitutional prohibition against imprisonment for debt.
In Martin v. People, 69 Colo. 60, 168 Pac. 1171 (1917), the Colorado Supreme Court rejected the argument set forth by the defendant, holding that Colorado law allowing suspension of sentence on conviction for nonsupport of an infant child upon giving bond for the child's support and providing for enforcement of the sentence upon violation of the conditions of the bond did not violate the provision of the Colorado Constitution prohibiting imprisonment for debt. The court held the sentence is for the crime *798 for which accused is convicted, though he may avoid its execution by complying with the statute, and the sentence is not for nonpayment of the debt.
In State v. Manley, 197 Iowa 46, 196 N.W. 724 (1924), the Iowa Supreme Court, in dealing with a statute almost identical to the statute in this case, held that where defendant was required by a divorce decree to pay the mother of his children a certain sum for their support, the assumption that a conviction under the relevant Utah statute punished failure to pay the amount so adjudged, in violation of the Utah Constitution provision prohibiting imprisonment for debt, was unwarranted, both the statute and indictment being directed against the failure of defendant to fulfill his common-law obligations to support his children.
There are other decisions in accord. Krumroy appears to confuse his common-law obligation to support his children with that imposed by the trial court in the divorce action. Krumroy was not prosecuted for failing to pay child support ordered by the divorce court. He was prosecuted and convicted for failing to support one of his children. The common-law obligation to support the children continues despite Krumroy's divorce and despite any child support orders issued by the divorce court. The Kansas Supreme Court described that obligation in State v. Miller, 111 Kan. 231, 234, 206 Pac. 744 (1921):
"The desertion act proceeds upon the theory that the state may compel a father to support his minor child whenever in destitute or necessitous circumstances, either as a public duty lawfully imposed by law, or as a means to prevent the state or the public from having to assume the burden of such support. In The State v. Wellman, 102 Kan. 503, 170 Pac. 1052, Mr. Justice Mason, speaking for the court said:
`We think that whether the defendant is answerable to the Kansas courts depends upon whether he owed this state a duty to support his children while they were with their mother. Although he was divorced from her, they were still his children, and, except for special circumstances, he was under an obligation to support them.'"
We hold that K.S.A. 21-3605 does not violate Article 16 of the Bill of Rights to the Kansas Constitution. The imprisonment of Krumroy is not for a debt and is not for an obligation arising on contract. It is for an obligation imposed by society and by the common *799 law, and it is perfectly proper for the State to provide imprisonment as a permissible punishment for the violation of that duty.

WITHOUT LAWFUL EXCUSE
Under K.S.A. 21-3605, the failure of a parent to support his or her child is not criminal unless it is "without lawful excuse." Krumroy argues that the State failed to prove this element of the crime beyond a reasonable doubt. This is the only issue raised as to the sufficiency of the evidence. Krumroy does not argue that the child in question was not his daughter or that she was not in necessitous circumstances. He further concedes that he provided no support for the child.
In State v. Kirkland, 17 Kan. App.2d 425, 431, 837 P.2d 846, rev. denied 251 Kan. 941 (1992), we held that the phrase "without lawful excuse" and the phrase "without just cause" were equivalent phrases as applied to the nonsupport statute. The meaning of "just cause," as that term relates to the nonsupport statute, was discussed by the Supreme Court in State v. Wohlfort, 123 Kan. 62, 68, 254 Pac. 317 (1927). We relied on Wohlfort in Kirkland. In Wohlfort, the Supreme Court approved an instruction defining just cause as follows:
"`You are instructed that the term "just cause" as used in the law, means any cause of sufficient import to relieve the defendant, who under the law is charged with the duty of providing for the support and maintenance of his wife, from such duty and legal obligation, such as mental incapacity or physical disability of the defendant, rendering him unable to provide for the support and maintenance of such wife; or financial conditions which the defendant has honestly, in good faith, endeavored to overcome. The term "just cause" cannot be defined with absolute accuracy, and may arise from any cause or combination of causes or circumstances, and you are to determine from the evidence in this case whether or not the defendant did or did not act with just cause in whatever he did or failed to do with relation to the offense with which he is charged in this case; and in considering such conditions and circumstances, you should consider the ability to earn a livelihood, and to determine whether the defendant did all that he could or should have done under the circumstances shown.'" 123 Kan. at 68.
In dealing with this issue, it is important to keep in mind our standard of review:

*800 "When the sufficiency of the evidence is challenged in a criminal case, the standard of review on appeal is whether, after review of all the evidence, viewed in the light most favorable to the prosecution, the appellate court is convinced that a rational factfinder could have found the defendant guilty beyond a reasonable doubt." (Emphasis added.) State v. Borthwick, 255 Kan. 899, Syl. ¶ 1, 880 P.2d 1261 (1994).
The issue of whether Krumroy failed to support his child without lawful excuse or without just cause is broader than determining whether he had sufficient income to provide support. The record shows that in several of the years in question, Krumroy's income exceeded his expenses. In those years, he clearly had the means to provide support. However, under the definition in Wohlfort, the question is also whether Krumroy had "the ability to earn a livelihood" and whether he did "all that he could or should have done under the circumstances shown." 123 Kan. at 68. Krumroy would be guilty of failing to provide support without lawful excuse if a jury concluded that he had the ability to earn a livelihood and did not do all that he could or should have done under the circumstances.
We have reviewed the evidence in this record in the light of our standard of review and the definitions set forth in Wohlfort. In doing so, we conclude that the evidence was sufficient to support a finding beyond a reasonable doubt that Krumroy's failure to support his child was without lawful excuse.
It is true that Krumroy presented evidence to show that he was ill and living in poverty. It is true that when arrested he was apparently rummaging through a dumpster looking for recyclables. However, there is another side to the evidence. The evidence indicates that Krumroy held two college degrees. His testimony showed him to be intelligent and able-bodied.
There is an abundance of evidence in the record from which a jury could have found, beyond a reasonable doubt, that Krumroy had "the ability to earn a livelihood" and that he did not do all that he "could or should have done" to earn a living and help support his daughter. There is also evidence in the record that in some of the years in question, Krumroy's income exceeded his living expenses.*801 Despite that fact, he provided little, if any, support for his daughter.
We hold there was sufficient evidence in the record from which a jury could determine beyond a reasonable doubt that Krumroy had failed to support his daughter "without a lawful excuse."

EVIDENTIARY CONSIDERATIONS
Krumroy argues that the trial court erred by admitting evidence of his gambling.
Krumroy's ex-wife testified that he had told her that he was moving to Southern California to earn a living at the racetrack. In his own testimony, he had admitted to frequent gambling at racetracks during his marriage. He also admitted that he continued to gamble at racetracks, at least during the early months after moving to California. Krumroy stated that after he went to California, "I went to the track frequently, yes."
Krumroy now argues that the trial court erred in admitting this evidence.
"Admission or exclusion of evidence rests within the sound discretion of the trial judge, subject to exclusionary rules." State v. Davis, 256 Kan. 1, Syl. ¶ 2, 833 P.2d 735 (1994). Krumroy argues that the evidence on his gambling was irrelevant:
"The primary test of admissibility of evidence is its relevancy to the issue in question. Relevancy is more a matter of logic and experience than of law. Evidence is relevant if it renders the desired inference more probable than it would be without the evidence or if it has any tendency in reason to prove any material fact." State v. Vaughn, 254 Kan. 191, Syl. ¶ 5, 865 P.2d 207 (1993).
We hold that the trial court did not err in admitting evidence of Krumroy's gambling. This evidence was relevant to both an essential element of the crime and to test his testimony. If he was gambling, he was spending money on something other than supporting himself or his child. He also testified extensively on his expenses and income. The evidence that he gambled at the race track has an impact on the credibility of Krumroy's testimony on his expenses and income.

KANSAS SENTENCING GUIDELINES ACT
Krumroy next argues that the trial court erred by imposing an *802 indeterminate sentence in this case. The initial complaint charged Krumroy with nonsupport from December 1, 1988, through November 1, 1990. However, that complaint was then amended at trial to charge him with nonsupport through April 15, 1994. The amendment of the complaint results in a situation in which there is an allegation of nonsupport both before and after July 1, 1993, the effective date of the Kansas Sentencing Guidelines Act (KSGA).
We conclude Krumroy's argument has no merit and that this issue is controlled by the following provisions of K.S.A 21-4723:
"If it cannot be determined whether the crime was committed on or after July 1, 1993, the person convicted of committing such crime shall be sentenced as if such crime had been committed prior to July 1, 1993. Except as provided in K.S.A. 21-4724, the provisions of this act creating a presumptive sentencing guidelines system have no application to crimes committed prior to July 1, 1993. A crime is committed prior to July 1, 1993, if any of the essential elements of the crime as then defined occurred before July 1, 1993. Except as provided in K.S.A. 21-4724, prosecutions for prior crimes shall be governed, prosecuted and punished under the laws existing at the time such crimes were committed." (Emphasis added.)
The statute expressly provides that a crime is committed prior to July 1, 1993, if any of the essential elements of the crime occurred prior to that date. If a crime occurs prior to July 1, 1993, it is not a KSGA crime.
In this case, the allegations of the complaint and the proof offered at trial showed that Krumroy had failed to support his child since 1988. This is an essential element of the crime of nonsupport, and it clearly occurred prior to July 1, 1993. Under the circumstances, we hold that the trial court did not err by imposing a sentence under the pre-KSGA law.
In concluding, we note that based on the record before us, Krumroy's criminal history indicates that his sentence should be converted to a KSGA sentence. If, or when, that is done, Krumroy will serve the more beneficial KSGA sentence and not the indeterminate sentence imposed. In effect, the KSGA will be applied through sentence conversion. Krumroy can show no prejudice from a failure to impose the KSGA sentence directly.


*803 JURY INSTRUCTION
Finally, Krumroy argues that the trial court erred in giving the jury the following instruction:
"It is not a defense to the charge of nonsupport of a child that the mother of such child, or any other person or organization, voluntary or involuntary furnishes necessary food, clothing, shelter, medical care, or any other remedial care for the child during the period of time the defendant failed to do so."
Krumroy objected to this instruction at trial on the grounds that it was prejudicial and that it would confuse the jury.
The trial court has discretion in presenting instructions to the jury. State v. Johnson, 255 Kan. 252, 256, 874 P.2d 623 (1994). "On appeal, the instructions should be approved if, after being considered in their entirety, they properly and fairly state the law as applied to the facts." 255 Kan. at 256.
"If the instructions properly and fairly state the law as applied to the facts in the case, and if the jury could not reasonably have been misled by them, then the instructions do not constitute reversible error although they may be in some small way erroneous." State v. Whitaker, 255 Kan. 118, 127, 872 P.2d 278 (1994).
Krumroy relies upon the recent case of State v. Selberg, 21 Kan. App.2d 610, 904 P.2d 1014 (1995), to assert that the giving of the instruction was error because it relieved the State of its burden of proving that the child was in "necessitous circumstances."
In Selberg, the sole issue was whether Selberg had met his child support obligations. No evidence was offered showing that the child was in necessitous circumstances. Selberg appealed his conviction of criminal nonsupport of a child, challenging, among other things, the trial court's decision to grant a motion in limine to prevent him from introducing evidence of a trust fund and the mother's income to show that the child was not in necessitous circumstances. The Selberg court expressly limited its holding to the peculiar facts before it.
We believe that the case before us is closer to the case of State v. Knetzer, 3 Kan. App.2d 673, 675, 600 P.2d 160 (1979), in which Judge Abbott, now Justice Abbott, writing for the court, concluded that there was "a reasonable inference that the children were in *804 `necessitous circumstances' during the entire period that defendant was charged with nonsupport."
The record in Knetzer is similar to the record in the case before us and allows us to draw the same reasonable inference that the child here was in necessitous circumstances.
The record reveals that the child here was in necessitous circumstances because the child's mother was forced to declare bankruptcy, even though she had a full-time teaching position and worked, at times, two or more other jobs. Here, Krumroy has essentially removed himself from any meaningful parenting obligation by his absence from the family or his refusal to provide material support. His life-style has forced the mother of his child to take time which could have been devoted to the child to work other jobs in order to survive. On several levelsmaterial, emotional, and parentalthe inferences are reasonably drawn here that the child was in necessitous circumstances.
Affirmed.
