
84 Ill. App.3d 1044 (1980)
406 N.E.2d 7
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
CHARLES WHITE, Defendant-Appellant.
No. 79-623.
Illinois Appellate Court  First District (1st Division).
Opinion filed May 5, 1980.
*1045 James J. Doherty, Public Defender, of Chicago (James L. Rhodes, Assistant Public Defender, of counsel), for appellant.
Bernard Carey, State's Attorney, of Chicago (Marcia B. Orr, Iris E. Sholder, and Gerald E. Nora, Assistant State's Attorneys, of counsel), for the People.
Judgment affirmed.
Mr. JUSTICE O'CONNOR delivered the opinion of the court:
After a bench trial, defendant Charles White was convicted of attempt sale of Federal food stamps and sentenced to 45 days in the House of Correction. Defendant appeals, contending that (1) the State failed to prove beyond a reasonable doubt either that defendant had the *1046 specific intent to commit the crime or that defendant's acts constituted a substantial step toward the commission of the crime, (2) defendant's conviction must be reversed because it is based on an overbroad statute, and (3) prosecutorial misconduct deprived defendant of a fair trial.
Complainant, Nabil Tadros, owned the Super Jet Food Store located at 4326 South State Street in Chicago, Illinois. Tadros testified that on February 20, 1979, defendant entered complainant's store. After speaking to one of the cashiers, defendant asked Tadros if he wanted to buy food stamps. Tadros stated that he told defendant that he did not want to buy any food stamps and that to do so would be illegal. Tadros testified that defendant replied that "[I]t has not been unlawful before." Tadros further stated that he responded, "[W]e can't do that," but defendant persisted, saying, "I need the money. I want to sell the food stamps." Tadros had defendant talk to one of the store employees while Tadros went to call the police. Police officers arrived about 15 minutes later.
Officer David Kutz testified that he went to 4326 South State Street in response to a report of a disturbance at the grocery store. He testified that after arriving at the store and having a conversation with Tadros, he then asked defendant if he was attempting to sell food stamps. Defendant replied, "No." Upon a search of defendant, Officer Kutz recovered a quantity of food stamps, an Illinois Department of Public Aid green card and authorization as a recipient of Federal food stamps.
Defendant testified that he entered the grocery store and asked the cashier what the value of $46 worth of food stamps was. The cashier directed defendant to Tadros. Defendant testified he asked Tadros the same question. Tadros told defendant to talk to another man. Defendant testified that when the police arrived they asked him if he was trying to sell food stamps and that he replied, "No." Defendant stated that he was an authorized recipient of food stamps. On cross-examination, defendant admitted he had $46 worth of food stamps on his person at the time he spoke with Tadros.
On cross-examination of defendant, the first question asked was, "Have you ever been convicted of theft before?" After the objection to that question was sustained, the prosecutor asked defense counsel whether or not he would stipulate "to defendant's criminal background." The final question asked of defendant by the prosecutor was:
"Q: Isn't it a fact, that you told this gentleman [Tadros] that you were selling food stamps to other storekeepers in the area?
A: No, I did not."
Defendant first contends that his conviction for attempt sale of food stamps must be reversed because the State failed to prove either that he intended to commit the crime of selling food stamps or that he took a *1047 substantial step toward the commission of that crime. The State contends that the evidence overwhelmingly showed that defendant specifically intended to commit that crime and that he took a substantial step in its commission.
 1 Section 11-24 of the Illinois Public Aid Code (Ill. Rev. Stat. 1977, ch. 23, par. 11-24) makes it a criminal offense to sell or exchange food stamps with "some other person for another article." In order to be convicted of attempt, the State must prove beyond a reasonable doubt that the defendant intended to commit a specific offense and performed an act which constituted a substantial step toward the commission of that offense. (Ill. Rev. Stat. 1977, ch. 38, par. 8-4(a); People v. Davis (1979), 70 Ill. App.3d 454, 388 N.E.2d 887.) Intent may be inferred from the acts of the accused and the surrounding circumstances. People v. Cheatem (1976), 35 Ill. App.3d 414, 342 N.E.2d 410; People v. Davis (1979), 70 Ill. App.3d 454, 388 N.E.2d 887.
We disagree with defendant's argument that the State proved neither that he intended to sell the food stamps nor that he performed an act which constituted a substantial step toward the commission of that offense. The store owner testified that defendant asked him if he wanted to buy food stamps. After being told by the store owner that he did not want to purchase food stamps, defendant persisted in his offer, saying that he needed the money. We find that this testimony, if believed, established defendant's intent to sell food stamps. We also find that defendant's asking Tadros if he wanted to buy food stamps constituted a substantial step toward the commission of the crime of selling food stamps.
 2 While it is clear that mere preparation to commit an offense does not constitute a "substantial step" (People v. Elmore (1971), 50 Ill.2d 10, 276 N.E.2d 325; People v. Walters (1979), 69 Ill. App.3d 906, 387 N.E.2d 1230; People v. Brown (1979), 75 Ill. App.3d 503, 394 N.E.2d 63), it is not necessary in order to constitute an attempt that the defendant perform the last deed immediately preceding that which would render the substantive crime complete. People v. Paluch (1966), 78 Ill. App.2d 356, 222 N.E.2d 508; People v. Walters (1979), 69 Ill. App.3d 906, 387 N.E.2d 1230; People v. Brown (1979), 75 Ill. App.3d 503, 394 N.E.2d 63.
Although defendant's account of the incident conflicts with that of Tadros, it is well established that the credibility of witnesses is a determination to be made by the trier of fact, and in a bench trial a reviewing court will not substitute its judgment for that of the trial court unless the trial court's determination is palpably erroneous. (People v. Holsey (1975), 30 Ill. App.3d 716, 332 N.E.2d 699.) We cannot say that it is palpably erroneous.
 3 We find that the State proved beyond a reasonable doubt that defendant intended to commit the crime of selling food stamps and *1048 performed an act which constituted a substantial step toward the commission of that offense.
Although the State argues that defendant's remaining contentions have been waived, we have elected to consider them. We find that they are without merit.
Defendant maintains that his conviction must be reversed because it is based on an overbroad statute in that the statute involved prohibits an exchange of food stamps for food in an authorized grocery store. The State contends that the statute rationally outlaws only unauthorized food stamp transactions and is therefore not unconstitutional.
Section 11-24 of the Illinois Public Aid Code (Ill. Rev. Stat. 1977, ch. 23, par. 11-24) provides in pertinent part:
"Any recipient, and any person not a recipient who participates in a federal commodity or food stamp program as authorized by Section 12-4.13 of Article XII, who receives surplus foods, food stamps, or other commodities made available by the Federal Government for distribution to needy persons and who sells such foods, food stamps, or other commodities or exchanges them with some other person for another article shall be guilty of a Class B misdemeanor."
A statute enjoys a presumption of constitutionality. (People v. Schwartz (1976), 64 Ill.2d 275, 356 N.E.2d 8, cert. denied (1977), 429 U.S. 1098, 51 L.Ed.2d 545, 97 S.Ct. 1116; People v. McPherson (1978), 65 Ill. App.3d 772, 382 N.E.2d 858.) All reasonable doubts are to be resolved in favor of upholding the validity of the statute. (Fitzpatrick v. City of Springfield (1973), 10 Ill. App.3d 317, 293 N.E.2d 712; People v. McPherson (1978), 65 Ill. App.3d 772, 382 N.E.2d 858.) In addition, the language of a statute must be given its plain and ordinary meaning. (Franzese v. Trinko (1977), 66 Ill.2d 136, 361 N.E.2d 858.) To determine legislative intent, a court may examine the language used, the reason for the law, the evil to be remedied, and the objects and purposes of the statute. People ex rel. Moss v. Pate (1964), 30 Ill.2d 271, 195 N.E.2d 641; People v. McPherson (1978), 65 Ill. App.3d 772, 382 N.E.2d 858.
 4 The intention of the statute in question is to facilitate the Federal food stamp program by prohibiting the transfer of food stamps to unauthorized persons. The statute shares the Federal program's stated purpose, which is to alleviate hunger and malnutrition among low-income households. (See 7 U.S.C. § 2011 (1977).) Being cognizant of the statute's purpose and giving the words of the statute their plain and ordinary meaning, we find that the statute in question does not prohibit the exchange of food stamps for food in an authorized grocery store. Even if *1049 the statute would admit of two constructions, one making the statute absurd and the other making it unreasonable, the construction leading to an absurd result should be avoided. People v. Floom (1977), 52 Ill. App.3d 971, 368 N.E.2d 410.
We find that the statute in question rationally outlaws only unauthorized food stamp transactions and is therefore not unconstitutional.
Defendant next contends that he was denied a fair trial when, during cross-examination, the prosecutor questioned defendant as to prior convictions. The State contends that because defendant's objection to the question was sustained it is presumed that the trial judge was not improperly influenced by the question and that any error in asking the question was cured when the trial judge sustained the objection.
 5, 6 A defendant who testifies in his own behalf may be impeached by a prior conviction only by the record of the conviction or an authenticated copy thereof. (People v. Flynn (1956), 8 Ill.2d 116, 133 N.E.2d 257; People v. Kosearas (1951), 408 Ill. 179, 96 N.E.2d 539; People v. Natoli (1979), 70 Ill. App.3d 131, 387 N.E.2d 1096.) Cross-examination of a defendant as to a prior conviction is improper where direct examination has not covered the subject. (People v. Natoli.) However, even though improper, cross-examination of a defendant as to a prior conviction does not mandate reversal unless the error has deprived defendant of substantial justice or influenced his determination of guilt. (People v. Madison (1974), 56 Ill.2d 476, 309 N.E.2d 11.) Moreover, in reviewing the finding of a judge sitting as the trier of fact, it is presumed that the judge considered only competent evidence. This presumption is overcome only where the record affirmatively shows that the court, in fact, relied on improper evidence. People v. Gilbert (1977), 68 Ill.2d 252, 369 N.E.2d 849.
 7 In the instant case, the cross-examination of defendant as to prior convictions was clearly improper. However, the trier of fact sustained defense counsel's objection to the question. We believe this ruling affirmatively establishes that the trial court did not consider the matter in its deliberations and therefore conclude that defendant did not suffer any prejudice. See People v. Lofthouse (1978), 58 Ill. App.3d 754, 374 N.E.2d 921.
 8 Defendant contends that he was prejudiced and denied a fair trial when the prosecutor asked defense counsel if he wanted to stipulate to defendant's criminal background. The presumption that in a bench trial the trial judge relies only on proper evidence and disregards all incompetent evidence in reaching its conclusion applies also to remarks of counsel. (People v. Miller (1964), 30 Ill.2d 110, 195 N.E.2d 694; People v. *1050 Janis (1977), 56 Ill. App.3d 160, 371 N.E.2d 1063.) We find that the record does not affirmatively establish any rebuttal of the presumption that the trial judge considered only competent evidence, and therefore we conclude that defendant suffered no prejudice because of this remark.
Defendant's final contention is that he was prejudiced and denied a fair trial when, during cross-examination, the prosecutor asked defendant if he had told Tadros that defendant had been selling food stamps to other store owners in the area. Defendant replied, "No, I did not." No objection was interposed by defendant. Again we find nothing in the record that affirmatively establishes that the trial judge considered improper evidence. We conclude that defendant was not prejudiced.
We also note that any misconduct on the part of the State's Attorney was not based on persistent unfounded insinuations which were substantial, repeated and definitely prejudicial. See People v. Nuccio (1969), 43 Ill.2d 375, 253 N.E.2d 353.
The judgment of the circuit court of Cook County is affirmed.
Judgment affirmed.
GOLDBERG, P.J., and CAMPBELL, J., concur.
