
47 Ill. App.3d 1026 (1977)
365 N.E.2d 501
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
RICKEY GRAY, Defendant-Appellant.
No. 62852.
Illinois Appellate Court  First District (4th Division).
Opinion filed April 14, 1977.
*1027 James J. Doherty, Public Defender, of Chicago (Roberta K. Cole and Richard D. Kharas, Assistant Public Defenders, of counsel), for appellant.
Bernard Carey, State's Attorney, of Chicago (Laurence J. Bolon, Joan S. Cherry, and James B. Davidson, Assistant State's Attorneys, of counsel), for the People.
Judgment affirmed.
Mr. JUSTICE ROMITI delivered the opinion of the court:
Defendant Rickey Gray was indicted for attempted burglary. (Ill. Rev. Stat. 1973, ch. 38, par. 8-4.) Following a bench trial defendant was found guilty and sentenced to five years' probation with six months of periodic imprisonment in the House of Correction. On appeal he contends that he was not proven guilty beyond a reasonable doubt and that the admission into evidence of a prior consistent statement of a State witness was reversible error.
We affirm the conviction.
*1028 The State called two witnesses and the defendant testified in his own behalf. The principal State witness was Chicago Police Officer Allen Suzudarski. He testified that at 2:10 p.m. on May 11, 1974, he and Officer Peter Bukari were in a marked police car at 1458 West 87th Street in Chicago. They were in front of the building at that location when its burglar alarm sounded. The officers made a visual check of the front of the building from their car. Observing no signs of entry, they then, within 10 seconds, drove to the rear of the building. The building was on the corner of Laflin and 87th Streets. The rear of the building abutted an alley, and the officers drove north up Laflin to that alley. A door to the building was located at the corner of Laflin and the alley. Officer Suzudarski saw three men standing about six inches from that door. The man closest to the officer had a crowbar in his hands; next to him was a man later identified as the defendant; next to the defendant was a man later identified as Maurice Lockett. When the police car entered the alley the three men turned and faced the officers. The man with the crowbar dropped it and all three ran east down the alley. Officer Suzudarski observed that the door lock was bent and the door was partially open. The officers then pursued the three men on foot. Halfway down the alley Lockett ran north up an intersecting alley. The other two suspects continued east, followed by the officers. Officer Suzudarski and his partner caught and arrested the defendant behind a gas station at 87th and Loomis. Officer Bukari then continued to look for the third man while Officer Suzudarski placed the defendant in the squad car and drove in search of Lockett. About four minutes after the arrest of the defendant, Suzudarski arrested Lockett at 8548 South Laflin. When he returned to where the chase began there were a number of juveniles in the area and the crowbar was gone.
On cross-examination defendant sought to impeach Officer Suzudarski by using the arrest report the officer had prepared. That report stated that Officer Bukari apprehended the defendant at 87th and Loomis. It also stated that Officer Suzudarski apprehended Lockett at 8548 Laflin. Suzudarski sought to explain this by again stating that both officers apprehended the defendant. However, the police report he had prepared did not affirmatively state that both officers made that arrest. The report also indicated that the officers noticed the door handle in an open position when they returned to the scene after Lockett was arrested. It did not mention the door being open. Officer Suzudarski stated that the report was wrong on this point and that he had seen the door open when he first approached the rear of the building.
On redirect examination the State attempted to bring in Officer Suzudarski's preliminary hearing testimony. Defendant objected and the *1029 court overruled the objection, stating: "This is redirect. As I understand it, redirect `Attempts to clear up some impeachment that you have got partially by putting in something and leaving out something.' Now, I think that they have a right to redirect to `Straighten it out' by using the preliminary hearing transcript." Later when defendant again objected to the use of this testimony the judge stated: "* * * he can use it to, and I use that word, to `Straighten' out whatever you thought your impeachment was on the police report. That doesn't mean that it impeaches it." In questioning the officer the State quoted from the preliminary hearing transcript and Suzudarski verified that at that hearing he testified that he and Officer Bukari arrested the defendant while Lockett was running north down another alley. He had also testified that after this arrest he arrested Lockett while Officer Bukari looked for the other man.
On re-cross-examination the defendant brought out that at the preliminary hearing Officer Suzudarski testified that it was Lockett who ran with "the third suspect."
Norman Erickson testified for the State that he used the building in question for his business as a plumbing contractor. He did not give the defendant permission to go into those premises. On May 11, 1974, he was called to that location by the police and at that time he turned off his burglar alarm which had been ringing. The alarm had gone off on prior occasions, apparently as a result of a malfunction. He did not notice anything about the rear door on the day he was called there by the police.
The defendant testified that on May 11, 1974, he had been waiting for a bus on the corner of 87th and Loomis for about five minutes when he was arrested. He denied having been at the rear of the building at 1458 West 87th Street, or having tried to break into it. He did not go down an alley to get to 87th and Loomis.
Before passing sentence the trial judge summarized the evidence:
"Now all the cases say that bystanders should never be found guilty of a crime unless he aids, abets, and all those words that they use. And I am calling it circumstantial, it is true the police did not see who used the crowbar on this door that rolled or broke off, whatever they said it was.
However, the circumstances are as I understand it, 2:35 or 2:40 in the afternoon, broad daylight, they are stopped in front of a building, and they hear what they check to be a burglar alarm, which goes off, and they look and see that there was nothing broken. What do they do? The police they go around the back and see if anything is broken, and when they turned the corner almost instantaneously three people started to run; one drops what the *1030 police officer calls a crowbar, which may have been used to jimmy that up. You see, they don't have to prove that beyond all reasonable doubt. It is circumstantial.
Now the thing is dropped so many feet away when they started to run. And this officer under oath testified under oath, even though there are two or three little minor things in the police report that may be a little bit different, but he never lost sight of him, arrested him with his partner in the gas station, and that's uncontroverted. The young man said that he was standing there five minutes, and you take the credibility of the officer, the officer says that he never left his eyes off him. * * *."

I.
Defendant's first contention is that he was not proven guilty beyond a reasonable doubt. The basis of defendant's conviction was a finding that he was legally accountable under section 5-2 of the Criminal Code for the conduct of the man with the crowbar. Defendant maintains that at most the evidence established that he was present at the scene of an attempted burglary, and then fled, conduct which does not establish his accountability for the crime.
Section 5-2 provides in relevant part:
"A person is legally accountable for the conduct of another when: * * * (c) Either before or during the commission of an offense, and with the intent to promote or facilitate such commission, he solicits, aids, abets, agrees or attempts to aid, such other person in the planning or commission of the offense * * *." Ill. Rev. Stat. 1973, ch. 38, par. 5-2.
Defendant relies on In re Woods (1974), 20 Ill. App.3d 641, 314 N.E.2d 606, for the proposition that mere presence at the scene of a crime, coupled with flight, does not establish accountability for that crime. In that case the evidence was that the complainant walked past two boys on the street and a moment later was pushed to the ground from behind and robbed. The complainant did not see who committed these acts. The defendant was identified as one of the two boys who were seen running from where the complainant had fallen. The appellate court held that this evidence was insufficient to prove the defendant guilty of robbery beyond a reasonable doubt as "* * * presence at the scene together with flight, in the absence of other circumstances indicating a common design to do an unlawful act, does not establish accountability."
 1 While it is true that mere presence at the scene of a crime does not establish accountability, such presence may be considered with other facts and circumstances in determining whether a defendant is accountable for the criminal acts of another. (People v. Nugara (1968), 39 Ill.2d 482, *1031 236 N.E.2d 693, cert. denied, 393 U.S. 925, 21 L.Ed.2d 261, 89 S.Ct. 257.) In Nugara, in affirming a defendant's conviction for attempted burglary under an accountability theory where the defendant was present at 3 a.m. in the entranceway of a shop while a person in whose company he had been for several hours attempted to burglarize that shop, and where the defendant fled when the police arrived, the court stated:
"`While mere presence and negative acquiescence is not sufficient to constitute a person a principal to a crime, one may aid and abet without actively participating in the overt act, and if the proof shows he was present at the crime without disapproving or opposing it, the trier of fact may competently consider this conduct with other circumstances and thereby reach a conclusion that such person assented to the commission of the criminal act, lent his countenance and approval and was thereby aiding and abetting the crime.' [Citations.]" 39 Ill.2d 482, 487.
In People v. Spagnolia (1961), 21 Ill.2d 455, 173 N.E.2d 431, our supreme court affirmed a defendant's conviction for attempted burglary. The evidence was that defendant stood in front of a store for 30 minutes while another man appeared to be "trying the door" of the store. When traffic was heavy or a pedestrian approached, the other man would join the defendant at the curb. The door was later determined to have been slightly damaged along with the wood next to the lock. At trial the defendant claimed that he was waiting for a bus by the store when he met the other suspect. He then stood by the curb and talked to that man, who moved back and forth between the store and the curb. He admitted that soon after he arrived he realized that the bus did not stop at the corner, but he remained there until the police arrived. In affirming his conviction the supreme court indicated that defendant's improbable story was a factor which could properly be considered along with his presence at the scene.
 2 In the case at bar, more than mere presence and flight on the part of the defendant was established. Immediately after circumstantial evidence indicated that an attempted burglary was committed, the officer's testimony was that defendant was seen six inches from the door which was the object of that attempt, and was standing right next to the man who had apparently made the attempt. Defendant then fled the scene and was apprehended behind a gas station. At trial defendant denied his presence at the scene of the crime, but chose to explain his presence near the scene by claiming to have been waiting for a bus on the corner in front of that gas station. The trial court clearly found this story to be incredible. Thus, in addition to defendant's presence at the scene, an important factor was his immediate proximity to the object of the crime and the person attempting it. Besides defendant's flight there is his denial *1032 of presence at the scene and his explanation of his presence near the scene, both of which the trial court did not believe. After considering all of these factors the trial court could properly have determined that the defendant was accountable for the attempted burglary. The judgment was based upon a determination of credibility which was reasonable. "The function of a trial court as a trier of fact is to determine the credibility of all the witnesses and the weight to be given to their testimony and its finding of guilty will be disturbed only where the evidence is so unreasonable, improbable and unsatisfactory as to leave a reasonable doubt as to defendant's guilt." People v. Catlett (1971), 48 Ill.2d 56, 64, 268 N.E.2d 378, 382.

II.
Defendant also contends that the admission of a prior consistent statement by the State's principal witness was reversible error.
 3, 4 The State first contends that defendant waived the issue by failing to raise it in his written motion for a new trial. Ordinarily the failure of a defendant to raise an issue in his written motion for a new trial constitutes a waiver of that issue on appeal. (People v. Pickett (1973), 54 Ill.2d 280, 296 N.E.2d 856.) However, as the State indicates, a central purpose of this requirement is to give the reviewing court the benefit of the trial court's judgment on the specific allegation. (People v. Irwin (1965), 32 Ill.2d 441, 207 N.E.2d 76.) Therefore, where the issue was in some manner clearly brought to the attention of the trial court and the issue may involve substantial prejudice to the defendant, the reviewing court may, in its discretion, consider the issue on its merits. (People v. Nunez (1974), 24 Ill. App.3d 163, 320 N.E.2d 462.) Defendant objected several times to the admission of the prior testimony at issue here. If, as the defendant maintains, the court erred in admitting this evidence and then relied on it in making its decision, this could be a matter of substantial prejudice to the defendant. Therefore, we will consider the issue on its merits.
 5 In its brief the State appears to concede that this evidence was improperly admitted, but argues that this was harmless error. The applicable rules governing prior consistent statements were stated in People v. Clark (1972), 52 Ill.2d 374, 389, 288 N.E.2d 363, 371:
"* * * a witness may not testify as to statements he made out of court for the purpose of corroborating his testimony given at the trial relative to the same subject. [Citations.] However, to rebut a charge or an inference that the witness is motivated to testify falsely or that his testimony is of recent fabrication, evidence is admissible that he told the same story before the motive came into existence or before the time of the alleged fabrication. [Citations.]"
*1033 In the case at bar, any motivation for Officer Suzudarski to fabricate testimony would have also existed at the preliminary hearing. Therefore, the prior statement from that hearing was not admissible to rebut any inference of recent fabrication that may have been contained in defendant's impeachment of the officer. Nor was the testimony admissible to "straighten out" defendant's attempted impeachment. When a witness has been impeached by proof that he has made a prior inconsistent statement, he may bring out all of that prior statement to qualify or explain the inconsistency. (People v. Hicks (1963), 28 Ill.2d 457, 192 N.E.2d 891; People v. Allen (1976), 36 Ill. App.3d 821, 344 N.E.2d 825.) But the State sought to rehabilitate their witness by introducing proof of an entirely separate statement made on a separate occasion. Therefore the trial court erred in admitting this testimony.
 6 Because the credibility of Officer Suzudarski was crucial in this case defendant asserts that it was reversible error to allow this corroborating testimony. As proof that the trial court relied on this evidence defendant cites the judge's statement that the preliminary hearing testimony was admissible to "straighten out" the impeachment. But as the record reveals, the judge later explained, "I use the word, `to straighten' out whatever you thought your impeachment was on the police report. That doesn't mean that it impeaches it." Later in summarizing the evidence the judge referred to the impeachment from the police report as "* * * two or three little minor things in the police report that may be a little bit different * * *." Clearly the trial court did not consider this impeachment evidence as damaging to the officer's testimony. The prior statement from the police report was not directly contradictory of the officer's in-court testimony. He testified on direct examination that he and Officer Bukari arrested the defendant and that then he pursued Lockett. The fact that only Officer Bukari was listed in the arrest report prepared by Suzudarski as the officer arresting the defendant does not contradict that testimony. The improperly admitted statement only repeated what was already in evidence  that both officers were involved in arresting the defendant.
Defendant's reliance on People v. DePoy (1968), 40 Ill.2d 433, 240 N.E.2d 616, is misplaced. In that case a murder conviction was reversed because of the improper admission of a prior consistent statement which directly implicated the defendant in the crime. The State's witness had testified on direct examination that the defendant was involved in the crime, but was then impeached by a prior inconsistent statement in which he had exonerated the defendant. The admission of the prior consistent statement was reversible error because it had a direct bearing on defendant's guilt or innocence and so was highly prejudicial to the defendant. In the case at bar, defendant was not directly contradicted by *1034 the prior inconsistent statement; the trial judge indicated that he did not consider the credibility of the State's witness was damaged by it, and the prior consistent statement introduced by the State did not have a direct bearing on defendant's guilt or innocence. Therefore, under the facts and circumstances before us, the admission of the statement was harmless error.
The judgment of the trial court is affirmed.
Affirmed.
DIERINGER, P.J., and LINN, J., concur.
