
66 Ill. App.3d 624 (1978)
384 N.E.2d 435
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
ROBERT G. MYTNIK, Defendant-Appellant.
No. 77-1642.
Illinois Appellate Court  First District (3rd Division).
Opinion filed November 15, 1978.
Rehearing denied December 13, 1978.
*625 William J. Martin, Ltd., of Chicago, for appellant.
Bernard Carey, State's Attorney, of Chicago (Lee T. Hettinger, Mary Ellen Dienes, and J. Jonathan Regunberg, Assistant State's Attorneys, of counsel), for the People.
Judgment affirmed.
Miss JUSTICE McGILLICUDDY delivered the opinion of the court:
Following a bench trial the defendant, Robert G. Mytnik, was convicted of the offense of battery (Ill. Rev. Stat. 1977, ch. 38, par. 12-3(a)), and sentenced to six months in the House of Correction. The defendant contends on appeal that (1) he was not proved guilty beyond a reasonable doubt, (2) he was unfairly prejudiced by inflammatory and improper remarks of the prosecutor, (3) the trial court prejudicially restricted his right to cross-examine a witness, and (4) his sentence was excessive.
The complainant, a 12-year-old girl, testified that on July 6, 1977, at 1 p.m., she was walking south on Artesian between 111th and 112th Streets in Chicago. She stated that the defendant, who was driving in a northerly direction, stopped his car to ask her what she was doing and if she needed a ride. The complainant declined and started to walk away. The defendant got out of his car, grabbed her shoulders from behind and pulled her toward him. The complainant screamed and her 13-year-old girl friend ran to them and jumped on his back. The 13-year-old girl bit the defendant while the complainant pinched his arms. The complainant stated that the defendant said, "Okay girls," got back into his car and drove off.
The complainant's testimony was corroborated by her friend, who added that just prior to the incident she and the complainant were in a restaurant. The defendant was at a nearby table and attracted their attention by making noises and winking at them. When they left the restaurant and walked south on Artesian, the witness stopped to pet a dog and heard the complainant cry out. She went to the girl's assistance and jumped on the defendant's back. After a further struggle, the defendant drove off and the witness stopped a police car and told them of the incident. The complainant also gave the police the license number of the defendant's car.
Police Officer William Towns testified that on July 7, 1977, he checked the license number and learned that it was registered to a company. When he called the company he was told that the driver would contact him. The defendant called and later reported to the police station. *626 The officer stated that the defendant admitted that he had seen the girls and offered them a ride, but he denied that he got out of his car or touched the girls.
The defendant testified in his own behalf. He stated that he was 39 years old, resided with his wife and two children and was employed as a field manager for an insurance company. He admitted that he saw the girls in the restaurant and stated that they were giggling between themselves and smiling at him. He denied that he did anything to attract their attention. After the girls left, he finished eating, got into his car and drove around the block. While driving north on Artesian he saw the girls walking south and called from the automobile window to ask them if they wanted a ride. They responded "No," and he proceeded on without getting out of his car or touching the girls.
The defendant contends that he was not proved guilty beyond a reasonable doubt because the girls did not see him leave his car and because the complainant described the car as brown when, in fact, the car was yellow. Further, he maintains that their testimony was not corroborated by any other witnesses to the attack, which allegedly occurred at 1 p.m. on a residential street. In addition, Officer Town did not notice any evidence of bite marks or bruises on the defendant when he saw him the next day.
 1 It is well settled that it is the function of the trier of fact to determine the credibility of the witnesses, the weight to be given to their testimony and the inference to be drawn from the evidence. (People v. Akis (1976), 63 Ill.2d 296, 347 N.E.2d 733.) Here, there is no dispute that the girls saw the defendant in the restaurant and saw him a few minutes later in his car when he offered them a ride. The girls were positive in their identification of the defendant as the assailant, and the record is silent as to whether the officer observed any marks or bruises on the defendant. The trial court was not compelled to accept the defendant's version of the incident. When the evidence is merely conflicting as here, a court of review will not substitute its judgment for that of the trier of fact. People v. Akis.
 2, 3 The defendant next contends that he did not receive a fair trial because the prosecutor made inflammatory comments which caused the court to improperly consider matters and probabilities not based on the evidence adduced at trial. The record shows that at the end of her closing argument, the prosecutor commented without objection that she wondered what would have happened if the complainant had been alone. Thereafter, the court expressed uncertainty for the reason a 39-year-old man would stop and offer a ride to two young girls whom he did not know. It is well settled that where the trial court is the trier of the fact, every presumption will be accorded that the court considered only admissible evidence and discarded inadmissible evidence in reaching its *627 conclusion. (People v. Robinson (1964), 30 Ill.2d 437, 197 N.E.2d 45.) The presumption that the court cannot be prejudiced by incompetent evidence can only be rebutted by an affirmative showing by the defendant (People v. Woods (1976), 41 Ill. App.3d 29, 353 N.E.2d 304), and there will be no reversal unless it affirmatively appears that the court was improperly influenced by such testimony. (People v. Meier (1975), 30 Ill. App.3d 1, 332 N.E.2d 1.) Here, in commenting upon the defendant's act of offering the girls a ride, the court was clearly considering the defendant's admission at trial that he had done so. There is no indication that the court was influenced by the prosecutor's remark as to what might have happened if the complainant had been alone. Moreover, at the post-trial hearing, it is clearly evident that the court rejected the prosecutor's comments when it stated: "Of course, the Court cannot consider the fact that her friend was alone. * * * This is not a part of the case."
 4 The defendant further contends that when the defense counsel was cross-examining the 13-year-old witness, the court improperly restricted his right to explore the extent of any bias, motive and opportunity for the witness to conform her testimony to that of the complainant. The defense counsel asked the witness if she had talked to the complainant about the incident, to which she replied, "Sometimes." He then asked, "And tell us about how many times you have talked about it?" At this point the prosecutor said: "Objection. She talked to the police, her mother and me too." The court sustained the objection and defense counsel asked no further questions of the witness. The State argues that the question was ambiguous in nature. The defense counsel abandoned questioning the witness and made no further attempt to pursue a theory of bias or improper motivation on the part of the witness. The record does not reveal that there was a clear and prejudicial abuse of discretion on the part of the trial court. People v. Gallo (1973), 54 Ill.2d 343, 297 N.E.2d 569.
 5 Finally, the defendant contends that the sentence was excessive for a man with no prior criminal record. The trial court initially sentenced the defendant to one year; however, at a post-trial hearing the sentence was reduced to a term of six months. The supreme court held in People v. Perruquet (1977), 68 Ill.2d 149, 153, 368 N.E.2d 882, that:
"Our Rule 615(b)(4) grants reviewing courts the power to reduce the sentence imposed by the trial court. [Citation.] The rule itself does not address the scope of this power or the circumstances under which it should be exercised. However, our decisions have firmly established that the imposition of a sentence is a matter of judicial discretion and that, absent an abuse of this discretion, the sentence of the trial court may not be altered upon review. [Citations.]"
*628 The sentence imposed is within the statutory range. The court was aware of the defendant's prior history. However, it was also aware of the nature of his particular battery. The trial judge listened to all the evidence, inspected all of the witnesses, and was in the best position to assess the seriousness of the offense and the most appropriate punishment. We find that the sentence imposed by the trial court was not an abuse of discretion.
For the foregoing reasons, the judgment of the Circuit Court of Cook County is affirmed.
Affirmed.
JIGANTI, P.J., concurs.
Mr. JUSTICE SIMON, concurring in part and dissenting in part:
The trial judge's comments at the time of sentencing indicate that he considered matters in deciding the sentence which were not relevant to that determination. This probably explains the length of the sentence for a battery involving slight physical harm which the defendant  a 39-year-old, employed and married homeowner and father who had no previous record and served honorably in the armed forces of the United States in Korea during the time of combat there  was given.
The offense with which the defendant was charged and of which he was found guilty was battery. However, comments of the court at the time of the sentencing hearing indicate that the trial judge might have been motivated, at least in part, by his expressed concern that the victim might also have been sexually molested had her companion not intervened. That the trial judge was thinking not only of what happened but of what might have happened is also suggested by his reluctance to postpone the filing of post-trial motions until a date after Labor Day, 1977. The conduct which resulted in the defendant's being found guilty occurred 2 days after the Fourth of July 1977, and the judge's comments suggest that he feared the defendant might repeat his conduct after another holiday weekend. The significance of the trial judge's expressed concern over what might have happened is not lessened by his comment that, "This is not part of the case."
Perhaps the trial judge's concern was not misplaced, but whatever sentence was imposed for the battery should have been based solely on what happened rather than on what might have happened and the harm the victim of the battery could have suffered. The defendant should have been sentenced for a battery which did not involve severe physical contact rather than for a sexual crime which did not occur.
*629 Thus, my study of the record convinces me that too much emphasis was placed on viewing the defendant as a sex offender and too little emphasis on attempting to determine whether his experience taught the defendant a lesson not to repeat his conduct and whether this defendant could best be restored to useful citizenship (Ill. Const. 1970, art. I, § 11) by serving a shorter jail sentence or being placed on probation. Accordingly, my opinion is that this matter should be remanded to the circuit court for a new sentencing hearing.
