
80 Ill. App.2d 243 (1967)
225 N.E.2d 76
The People of the State of Illinois, Plaintiff-Appellee,
v.
Clark Crable, Defendant-Appellant.
Gen. No. 51,558.
Illinois Appellate Court  First District, Fourth Division.
March 3, 1967.
*244 *245 Robert W. Patterson, of Chicago, for appellant.
Daniel P. Ward, State's Attorney of Cook County, of Chicago (Elmer C. Kissane, Morton Friedman and Allan C. Zuckerman, Assistant State's Attorneys, of counsel), for appellee.
MR. JUSTICE DRUCKER delivered the opinion of the court.
After a bench trial in 1962 the defendant, Clark Crable, was convicted of armed robbery and was sentenced to the penitentiary for a term of not less than three nor more than eight years.

Contentions on Appeal
1. Defendant did not understandingly waive his right to a jury trial;
2. Defendant was not proven guilty beyond a reasonable doubt;
3. Appointed defense counsel was incompetent.

Facts and Opinion Relating to the Jury Waiver
Prior to the formal signing of the jury waiver the following colloquy took place in open court among the trial judge, defendant and defense counsel:
Court: All the witnesses in the Crable case, step forward, please.
Is this a bench trial or a jury trial?
Defense Counsel: Judge, I have discussed this matter with the defendant Clark Crable. He wishes to waive his right to a trial by jury and submit this matter to the Court as a bench trial. Is that right, Clark? What's your answer?
Defendant: Yes. I will take a jury.

*246 Defense Counsel: Take a what? Take a jury?
Court: He wants a jury trial. All right. All Right, we will give him a jury trial.
Defendant: I would 
Defense Counsel: Keep your voice up.
Defendant: I would rather take a bench, your Honor.
Court: You would rather take a bench trial?
Defendant: Yes.
Court: You have to make the decision now. You understand, Crable, that you are entitled to be tried by a jury?
Defendant: I will take a bench.
Court: If you desire to have a jury trial, you are entitled to it.
Defendant: I would rather take a bench.
Court: You would rather take a bench trial?
Defendant: Yes.
Court: All right. Have him sign a jury waiver.
Defense Counsel: May the record show he just changed his mind from a jury to a bench trial. I haven't discussed this matter with you in any shape or form, have I?
Defendant: No.
Court: You mean you haven't discussed it 
Defense Counsel: Since he just changed his mind.
Court:  when he appeared before the bench here?
Defense Counsel: Yes, that is what I mean.
Court: That was apparent to the Court also.
Defense Counsel: The defendant Clark Crable has signed a jury waiver, your Honor.
[1, 2] There is no specific or defined formula to follow in determining whether a jury waiver is understandingly made, and the determination must therefore rest upon the facts of each particular case. People v. *247 Wesley, 30 Ill.2d 131, 195 NE2d 708. In the instant case there is no allegation that the defendant was illiterate. From a review of the proceedings it is clear that defendant's response to the trial judge was confused because of the way in which the alternatives were presented to him and not because he didn't understand his right to a jury trial. The confusion was eventually resolved prior to defendant's signing of the jury waiver when defendant, in response to the statement of the trial judge informing him of his right to a jury trial, replied that he desired a bench trial. In view of the entire proceedings, we are of the opinion that the record shows that defendant was adequately admonished as to his rights, that he understood that a bench trial was not a trial by jury and that, while represented by counsel, he understandingly waived his right to trial by jury. People v. Benjamin, 34 Ill.2d 183, 187, 215 NE2d 216.

Evidence at Trial
According to the evidence adduced in favor of the prosecution, defendant was identified by two witnesses as the man who robbed a cabdriver. One of the witnesses was the victim, Chester Willis, who testified that: Defendant (wearing sunglasses with a silver rim) entered his cab as a purported passenger at 63rd and Loomis in Chicago, Illinois, on June 22, 1962, at approximately 3:00 a.m.; the dome light inside the cab was turned on; defendant directed Willis to drive to 7304 South Harvard and during the entire trip the front seat light remained lit; at the conclusion of the trip Willis again turned on the dome light to see the fare; defendant grabbed him from behind, held a gun to his head and took his money (a money changer and some bills). Willis further testified that defendant attempted to use the cab as a getaway car but that he (Willis) accidentally dropped the keys to the floor alongside the front seat; *248 that defendant was angered, pushed Willis on his back onto the front seat and pummeled him with blows. At this time Willis was looking up at his assailant. The robber subsequently left the scene of his crime.
Another witness, Noble Davis, testified that his car was stopped in back of Willis' cab during the commission of the robbery (his testimony is conflicting as to whether he was seven feet or sixty five feet behind the cab); that he saw the robber leave the cab and place a black scarf over his head; and that he pursued the robber in vain.
Defendant was arrested in a vestibule approximately two blocks from the scene of the robbery. According to one of the arresting officers, James Craig, defendant stated that he was sleeping in the vestibule after having been to a party with a girl friend. On his person were a pair of sunglasses and a black scarf (People's Exhibits 1 and 2, respectively). Defendant had neither a gun nor the money changer on his person. He had some change in his pocket but no bills. After his arrest, defendant was brought to the scene of the crime and, after putting on his sunglasses, was positively identified by Willis. Defendant was subsequently identified as the robber by Davis from a lineup at the police station[*] and was identified at trial by Davis and Willis.
At trial defendant denied committing the robbery and testified that he was sitting in the vestibule with his shoes off because he had a sprained ankle. He denied having the black scarf in his possession at the time of arrest. While he also denied that the sunglasses were those taken from his person at the time of arrest, defendant stated that at the time of his arrest he had sunglasses which were silver.
*249 No other witnesses were called. After finding defendant guilty the trial judge held a hearing on aggravation and mitigation. The prosecutor at that time informed the court that in 1960 defendant was sent to St. Charles (referring to the Illinois State Training School for Boys, located in St. Charles, Illinois, to which boys may be committed by the Youth Commission after a finding of delinquency by the Family Court). The court was also informed that in 1962 defendant was arrested and charged with criminal damage to property but the charge was dismissed. The judge then stated that the latter charge would not be considered in fixing punishment. However, in fixing the punishment the judge did consider the fact that defendant was sent to St. Charles. In denying the request of defendant's counsel that the sentence be a minimum of one year and a maximum of eight years in the penitentiary, the judge stated: "No. He has been in trouble before. I want to make sure he is down there a little while anyway."

Opinion
[3, 4] In a bench trial it is the function of the trial court to determine the credibility of the witnesses and the weight to be afforded their testimony. People v. Clark, 30 Ill.2d 216, 195 NE2d 631. The testimony of the cabdriver, Chester Willis, is in and of itself sufficient to prove defendant guilty beyond a reasonable doubt. While defendant was beating him on the front seat, Willis had ample opportunity to view him. Moreover, when defendant entered the cab the dome light was turned on and during the entire trip the light in the front seat of the cab was on. Moreover, the defendant was seen leaving the scene wearing a black scarf and sunglasses. When defendant was arrested shortly thereafter only two blocks from the scene of the robbery he had in his possession a black scarf and sunglasses.
*250 We find that defendant was proven guilty beyond a reasonable doubt.
[5] Defendant also contends that his counsel at trial was incompetent. After a thorough examination of the record we find no merit in that contention.
[6-8] In accordance with section 1-7(g) of the Illinois Criminal Code of 1961 (Ill Rev Stats 1961, c 38, § 1-7(g)) the trial judge considered evidence on aggravation in determining the sentence to be imposed, but in so doing erroneously took into consideration the defendant's stay at St. Charles. The Family Court Act (Ill Rev Stats 1961, c 23, § 2001) provides that:
A disposition of any child under this Act or any evidence given in such cause, shall not, in any civil, criminal or other cause or proceeding whatever in any court, be lawful or proper evidence against such child for any purpose whatever....
However, this error could have affected only the length of defendant's sentence and therefore does not constitute reversible error. In appropriate cases this court has the power to reduce sentences. Ill Rev Stats 1965, c 38, § 121-9(b)(4). At the hearing on mitigation and aggravation defendant's attorney had suggested a sentence of one to eight years. The sentence is reduced to not less than one year nor more than eight years in the penitentiary.
The judgment of the trial court is amended by reducing the sentence as aforesaid, and as amended is affirmed.
Judgment amended and as amended affirmed.
ENGLISH, P.J. and McCORMICK, J., concur.
NOTES
[*]   Davis and one of the arresting officers, James Craig, testified that there were five men in the lineup. Defendant alone testified that there were only three men in the lineup, including himself.
