
36 Ill. App.3d 177 (1976)
343 N.E.2d 713
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
KENNETH BOWIE, Defendant-Appellant.
No. 60751.
Illinois Appellate Court  First District (3rd Division).
Opinion filed January 22, 1976.
Rehearing denied March 4, 1976.
*178 Paul Bradley and Rebecca Davidson, both of State Appellate Defender's Office, of Chicago, for appellant.
Bernard Carey, State's Attorney, of Chicago (John T. Theis and Mary C. Ubatuba, Assistant State's Attorneys, of counsel), for the People.
Reversed and remanded.
Mr. JUSTICE McGLOON delivered the opinion of the court:
Defendant, Kenneth Bowie, was found guilty by the circuit court of Cook County sitting without a jury of the offenses of battery, resisting a police officer, and criminal trespass to land. Defendant was sentenced to one year concurrent sentences on each charge. On appeal, defendant alleges that the State failed to prove him guilty of battery beyond a reasonable doubt, and that a police officer, in the context of this case, cannot be considered to be an owner or occupant within the meaning of the criminal trespass to land statute. Ill. Rev. Stat. 1973, ch. 38, par. 21-3.
We reverse and remand.
The record reveals the following pertinent facts. At 8:30 on the morning of May 11, 1973, defendant attempted to enter Harlan High School, but was asked to leave the school building by a uniformed *179 Chicago police officer who said he was assigned to the school. The policeman escorted defendant to the door and told defendant that he was trespassing and would be arrested if he returned. Between thirty and forty-five minutes later, the policeman saw defendant in the school building and placed defendant under arrest. Our reading of the record discloses conflicting accounts of what next transpired.
The police officer testified that as they were walking toward the school office, defendant began to use obscene language and then took a swing at the uniformed policeman. A struggle ensued. The defendant's testimony was that as they were walking down the hallway, defendant commented that the officer's grip on his arm was too tight. The officer said, "Don't tell me what to do," and then started beating defendant over the head with his policeman's club. Defendant's head was bleeding as a result of these blows. During the ensuing struggle, defendant tried to wrest away the police officer's club to avoid further bodily injury. Defendant further testified that he did not resist the policeman until he was beaten over the head with the club. The third witness at trial was a friend of defendant who testified that he saw the policeman take defendant by the arm, say "You can't tell me what to do," draw his stick, and beat the defendant over the head with the stick. A struggle ensued during which defendant did not take any swings at the officer; defendant tried only to get away. At the conclusion of the bench trial, the court found defendant guilty of battery, criminal trespass to land, and resisting a police officer. (Ill. Rev. Stat. 1973, ch. 38, pars. 12-3, 21-3 and 31-1.) The judge then sentenced defendant to one-year concurrent sentences on each charge.
 1 Defendant's first allegation on appeal is that he was not proven guilty of battery beyond a reasonable doubt. The evidence presented at trial as to the battery was contradictory; the police officer and defendant each claimed the other began the physical altercation. The determination of credibility of witnesses is for the trial court in the absence of a jury, and the trial court's judgment will not be overturned on review unless a defendant's guilt was not proven beyond a reasonable doubt, an unjust decision was reached, or an error of prejudicial dimension occurred in the trial. People v. Mallett (1971), 2 Ill. App.3d 55, 58.
 2 Our reading of the record discloses that defendant did not have a fair trial because the trial judge did not fairly consider the question of credibility. This will become clear as we examine defense counsel's closing argument:
"DEFENSE COUNSEL: And along with that, in regard to the battery charge, we certainly have a conflict of the evidence as to who struck who first. It would seem to me that we have *180 two witnesses, of course there is a question of credibility, both of them saying that they observed the defendant and his witness, they observed the officer strike the defendant twice in the head. There was blood resulting and an injury inflicted on the defendant.
THE COURT: Who said so?
DEFENSE COUNSEL: The defendant.
THE COURT: I didn't hear that. I heard nothing about that the defendant stating anything about that he was bleeding, strike that out." (Emphasis added.)
Yet, the record contains the defendant's testimony on direct examination:
"* * * he grabbed me and told me that I was going to be placed under arrest and he told me that he warned me about being there before and we were walking down the hallway and he had a tight grip on my arm and I told him that it wasn't necessary, that I wasn't going anywhere and he said, I don't tell him what to do, and he hit me up beside my head and I grabbed my head and blood started rushing down and he hit me again * * *."
During the hearing on aggravation and mitigation, defense counsel again raised the issue of credibility but the trial court stated that the issue merged in his finding of guilty.
 3 A trial judge sitting as the trier of fact is limited to the record before him, and it is a denial of due process of law for the court to consider matters outside the record. (People v. Collins (1974), 21 Ill. App.3d 800, 805.) Similarly, the trial judge must consider all the matters in the record before deciding the case. Where a record affirmatively indicates, as in the instant case, that the trial judge did not remember or consider the crux of the defense when entering judgment, we hold that defendant did not receive a fair trial. Accordingly, the convictions are reversed and the cause is remanded for a new trial.
 4 Since we are remanding the cause for a new trial, we shall only briefly comment on other matters appearing of record:
A. The common law record indicates that defendant was sentenced to one year on each charge, the sentences to run concurrently. The report of proceedings, however, contains a statement by the court that he was sentencing defendant to one year only on the battery. Such an obvious discrepancy should neither be committed, nor permitted to reach a reviewing court without correction or comment by the litigants.
B. After finding defendant guilty, a hearing on aggravation and mitigation was held. The following appears of record:
"THE DEFENDANT: Your Honor 

*181 THE COURT: Look, you weren't good as a witness, you are finished, don't you say anything else."
The law provides that at such a hearing, "the court shall afford the defendant the opportunity to make a statement in his own behalf." (Ill. Rev. Stat. 1973, ch. 38, par. 1005-4-1(a) (5).) This was not the type of hearing the law contemplates a defendant should receive in a proceeding on aggravation and mitigation.
C. Defendant was given a one-year sentence on the battery charge. Battery is a Class A misdemeanor, punishable by imprisonment for any term less than one year. (Ill. Rev. Stat. 1973, ch. 38, par. 1005-8-3 (a)(1).) Trial courts should be careful to conform sentences to the law.
D. The requirements of People v. Lilly (1974), 56 Ill.2d 493, should be adhered to by trial courts.
E. We need not reach the issue in this case of whether a police officer may properly be considered to be an owner or occupant within the meaning of the criminal trespass to land statute.
In summary, we hold that defendant did not receive a fair trial. The convictions are reversed and the cause is remanded to the circuit court of Cook County for further proceedings consistent with the views expressed herein.
Judgments reversed and remanded.
DEMPSEY and McNAMARA, JJ., concur.
