delivered the opinion of the court:
Billie McKee was convicted of murder in a bench trial in the circuit court of Cook County and sentenced to 50 to 75 years in the penitentiary. Two others, Edward Clifford *267and DeKoven Thomas, were jointly indicted with defendant but a severance was granted and defendant was tried alone. His direct appeal challenges the legality of his arrest, the admissions of his confession and certain other evidence on constitutional grounds. He also contends that he was not proved guilty beyond a reasonable doubt, that admission into evidence of statements of an alleged accomplice was improper and highly prejudicial and that the crime of murder charged in the indictment was at variance with the crime of felony murder of which he was convicted.
On April 9, 1963, Jerry Cole was shot and killed with a shotgun while seated in his parking-lot attendant’s shack, and $368 was taken from his person. On April 18 Clifford and Thomas were arrested and on information furnished by them the police arrested defendant at a room in a hotel. In two oral statements, one at the scene of his arrest and later at the police station, defendant allegedly admitted taking part in the robbery to the extent of accompanying the other two men in the car, but he accused Clifford of doing the shooting while he and Thomas remained in the car. A motion to suppress these admissions, and also a pistol and cartridges taken at the time of defendant’s arrest, was denied and it was stipulated that the testimony of the police officers at the trial would be the same as their testimony at the hearing on the motion to suppress. For reasons later appearing herein we shall first discuss the trial evidence.
The only witness to the shooting testified that he was sitting with the decedent when someone banged open the door and announced it was a stick-up; that when the decedent said not to play with him the shotgun went off; that the robber didn’t bother with the parking-lot money but rather went through decedent’s pockets removing only what money he had. He was unable to identify the robber even as to being white or Negro. Several witnesses testified they had seen defendant at a party held by the decedent three *268weeks previously and that defendant had observed that decedent carried a lot of money on his person and had asked where the guy got it all.
Clifford, the alleged accomplice, was then called as a State’s witness but he protested his innocence and also that of McKee, stating that anything he had previously told the police was a lie. Over objection he was made a court’s witness and the State’s Attorney proceeded to cross-examine him. His resultant testimony was confusing and contradictory and takes up approximately 127 pages in the record representing almost a full day on the stand. He was confronted with two statements he had previously made to the police. The first one was short, in which he described the planning of the robbery by defendant, Thomas, and himself, but denied being with them in the car or taking any part in the escapade. In this statement he also said that he was present when McKee and Thomas returned, that McKee said he had had to shoot the man, that McKee at that time had a shotgun and $368 which he had taken from decedent, and that McKee gave him $35 of this sum. His second statement was lengthy and was given to the State’s Attorney on the night of his arrest and was reduced to writing. In it he described in detail the planning of the robbery, the route to the scene, the conversation of the parties, the stealing of a car for transportation, the times involved, the return and the splitting of the proceeds. In this statement he also stated that defendant got out of the car at the scene, put two shells in the gun and climbed down the ladder to the shack from an overhead street, and that after they heard two shots he and Thomas took off without McKee and later met to split the proceeds.
On the theory of “impeachment” the State was permitted to confront him on a question-and-answer basis with apparently every item in both statements. On numerous occasions he protested that though he recalled making such statements they were false.' He said a police officer had *269offered him five years probation if he would frame McKee on murder. He stated that he was told McKee accused him of killing the attendant, that Thomas’s statement had been read to him and that to exonerate himself he patterned his statement after that of Thomas. He said the police had schooled him on the location of the parking lot and the times involved so that they would conform to the distances, travelled to the lot. He repeatedly stated that all the facts in both statements were lies.
Finally a recess was taken and the court directed that no one should talk to Clifford. On resumption of his testimony he admitted the facts in his first statement were true, that he had been in on the planning but he had stayed at the apartment and did not go with McKee and Thomas when the robbery and killing occurred. Another recess was taken and again the court warned that no one was to talk to Clifford. When called back to the stand he was reluctant to answer defense counsel’s question as to whether there actually had been a planned meeting. When pressed he started to cry; he was not quite 19 years of age. The court inquired whether he was afraid to answer and he stated that he was, that that morning McKee had threatened him in the bull pen. When asked if he were also afraid of the State he said that he was, that at the first recess a police officer had said to him, “Now look what you have done. Would you rather have a little time or big time?”. On continuing his testimony he stated that there had been no meeting to plan the robbery. On inquiry by the court he stated that his first statement was not true and then later changed again and said it was true but that his second statement was all lies.
Defense counsel then moved to strike all of Clifford’s testimony as inadmissible, improper and prejudicial, citing the fact that a severance was granted in the first place so as not to allow the statements of the various co-defendants to be used against one another. The court denied the mo*270tion, stating the statements were properly used to impeach a witness who had taken the prosecution by surprise.
In considering the admissibility of this testimony it is necessary to understand the difference between the right to impeach a witness and to cross-examine him as a court’s witness. A witness may be made a court’s witness and subjected to cross-examination by either side where, for sufficient reason shown, his integrity or veracity is doubtful and neither side desires to vouch for his testimony. The purpose of the rule is to prevent a miscarriage of justice by having an eyewitness to the crime fail to testify, but the cross-examination should be strictly restricted to the direct issues and. not permitted on collateral matters. (People v. Hundley, 4 Ill.2d 244; People v. Daniels, 354 Ill. 600; People v. Cardinelli, 297 Ill. 116; People v. Grigsby, 357 Ill. 141.) In effect, it is an attempt to arrive at the truth based on sworn testimony. The purpose of impeachment is to destroy credibility, not to prove the facts stated in the impeaching statement. What the witness stated out of court and out of presence of the defendant is pure hearsay and incompetent. Legally it is not evidence of defendant’s guilt and cannot be received as proof of the fact at issue. (People v. Hundley, 4 Ill.2d 244; People v. Barragan, 337 Ill. 531; People v. Johnson, 333 Ill. 469.) As stated in People v. Grigsby, 357 Ill. 141, 149, “If the witness admitted making the previous statement, it would prove nothing except that he, an admittedly unreliable witness, had said so. If the witness denied making the statement the matter would necessarily end there, because to pursue it further would be trying a collateral issue rather than a fact material under the indictment. The defendant would thus be hopelesly enmeshed in a prejudicial situation without anyone having assumed responsibility or liability for perjury”.
In the case before us all parties and the court seem to use the words “court’s witness” and “impeachment” inter*271changeably. Rather than restricting the examination of the witness to the direct issues, the widest possible latitude was allowed so that the minutest detail of the out-of-court statements was brought before the court, who was acting as judge of the law as well as finder of the facts. Under the circumstances this was an impossible task for any man. Had the case been tried before a jury the admission of such testimony would necessarily constitute reversible error for the reason that such evidence is not competent even for the purpose of impeachment where the statement bears directly upon defendant’s guilt or innocence. The prejudicial affect upon a jury would be too much. (People v. Tunstall, 17 Ill.2d 160.) But, the State argues, a judge is more schooled in the use of evidence and there is a presumption that he will consider only competent evidence in reaching his decision, and the admission of such testimony, even if error, is therefore not prejudicial. (People v. Cox, 22 Ill.2d 534.) The finding of the court here prevents application of this rule. In its finding the court stated in part as follows: “McKee is accountable for this murder, it is clear. Whether it was McKee, or Clifford, or DeKoven Thomas that used the shotgun, brutally took Gerry Cole’s life, is not material to the issues of whether McKee is accountable for murder. He went down there, as he said he did. He had a shotgun, and it was used there, there is no question about that. Jesse Marshall [the eyewitness] testified as to that fact, and the testimony of Clifford, which he acknowledged, where he acknowledged saying that McKee got out of the car, loaded the shotgun, he loaded it with 2 rounds, in its detail is more significant, this could not have been conceived or suggested to him by the police, because the evidence was there. There was only one blast fired, and it certainly looked that that would be enough to kill a man at point-blank range.” (Emphasis supplied. )
The sole source of the references to the loading of the *272shotgun and the number of shells used was the second out-of-court statement of Clifford which he repudiated at all times in his testimony in court. This “evidence” was incompetent; it was hearsay; it was admitted as evidence under the guise of impeachment and had no probative value as to the guilt of the defendant.
Further indicative of the prejudicial effect of such evidence on the mind is the argument contained in a part of the State’s brief where it is stated, “When you consider the oral and written admissions by Clifford, DeKoven Thomas and McKee, which were all given at different times, but which were surprisingly similar, the Court could come to but one conclusion — the defendants and specifically McKee did participate in this robbery and the resulting murder, and the verdict was not palpably contrary to the weight of the evidence”. Even counsel, after sober reflection, cannot disabuse his mind of the incompetent evidence attributable not only to Clifford but also to DeKoven Thomas who didn’t even testify in the case.
The State argues further that nonetheless there is sufficient competent evidence in the record to support a conviction of felony murder, viz., the fact that defendant knew decedent carried large sums of money on his person and the robber took money only from the person of decedent, and the fact that defendant admitted that he was in on the planning of the robbery and that he had accompanied the others to the scene. This may be true but it is not for this court to determine the guilt or innocence of defendant, but rather to determine whether the trial in which he was convicted was fair and impartial and free from prejudicial error. Under the circumstances and the precedents previously cited we can only conclude that the court’s finding was based in part on 'incompetent evidence which was so highly prejudicial to defendant as to require a finding of reversible error. On remandment and a new trial free from *273such prejudicial error the question of his guilt or innocence can be determined.
Because a new trial will be necessary we shall consider certain other contentions of defendant.
Defendant urges that his arrest was made without a warrant and without probable cause and that any declarations made by him are therefore barred. The rule is that probable cause exists for arrest where a reasonable and prudent man, having knowledge possessed by the officer at the time of the arrest, would believe the defendant committed the offense. (People v. Jones, 31 Ill.2d 240.) Here two men had been arrested and, admitting their own participation in the robbery and murder, they implicated defendant McKee and told the police where he might be found. The police immediately went to the hotel, inquired as to the room of defendant, found the door in the process of being opened by defendant, announced their identity and purpose, arrested him and removed a gun from his person. We hold such arrest to be lawful and fully supported by probable cause and his statement made at that time to be admissible.
Defendant next maintains that admission of his oral confessions taken prior to bringing him before a magistrate constitutes a denial of his constitutional rights as secured to him under the rules set forth in Mallory v. United States, 354 U.S. 449, 1 L. Ed. 2d 1479, 77 S. Ct. 1356; McNabb v. United States, 318 U.S. 332, 87 L. Ed. 819. He argues further that he was not informed of his rights to counsel and to remain silent, as required by Miranda v. Arizona, 384 U.S. 436, 16 L. Ed. 2d 694, 86 S. Ct. 1602. We cannot agree with either contention. The Miranda decision is not mandatorily applicable to cases where, as here, trial occurred before the date of that decision. (Johnson v. New Jersey, 384 U.S. 719, 16 L. Ed. 2d 882, 86 S. Ct. 1772.) And we have no cause to depart from our previous de*274cisions that otherwise voluntary statements need not be rejected because the State did not affirmatively caution the accused as to his rights. (People v. Ostrand, 35 Ill.2d 520; People v. Hartgraves, 31 Ill.2d 375.) The same reasoning applies to the magistrate contention, the Mallory-McNabb rule having been held applicable only to Federal courts. (Gallegos v. Nebraska, 342 U.S. 55, 96 L. Ed. 86, 72 S. Ct. 141.) And here also we have been consistent in our refusal to adopt such rule. People v. Kees, 32 Ill.2d 299; People v. Miller, 33 Ill.2d 439.
A further contention of defendant is that he was charged with murder in the indictment and convicted of a felony murder and such fact constitutes a fatal variance. We disagree. The identical point has already been decided. Section 9—1 (a) of the Criminal Code defines the crime of murder as follows: “A person who kills an individual without lawful justification commits murder if, in performing the acts which cause the death: * * *. (3) He is attempting or committing a forcible felony other than voluntary manslaughter.” (Ill. Rev. Stat. 1965, chap. 38, par. 9—1.) In People v. Valentine, 22 Ill.2d 554, the defendant argued that he was not convicted of the same crime charged in the indictment, that he was charged with killing a specific person whereas he was tried and convicted on the theory of a felony murder committed by an accomplice. We held that where an accomplice kills after going into a tavern for the admitted purpose of committing an unlawful act and the killing is a consequence of that act, he may be convicted of murder. In People v. Bates, 16 Ill.2d 290, we held that it is not essential that the indictment against an accessory describe the circumstances as they actually occurred, but it is sufficient if he is charged with the legal effect of acts performed by him.
Finally, defendant contends that the testimony of the witnesses relative to seeing defendant at a party three weeks prior to the crime was incompetent and irrelevant. It will *275be recalled that one of these witnesses stated that he saw the defendant at the party and defendant commented wonderingly on the fact that decedent carried so much money on his person. We hold such evidence was relevant and of probative value in that it tended to prove the presence of a motive which would lead the defendant to commit the acts with which he was charged.
For the reasons stated the judgment of the circuit court of Cook County is reversed and the cause remanded for a new trial consistent with the principles herein expressed.
Reversed and remanded.
Mr. Justice Ward took no part in the consideration or decision of this case.