delivered the opinion of the court:
Following a jury trial, defendant was convicted of the offenses of armed robbery and aggravated battery (Ill. Rev. Stat. 1973, ch. 38, pars. 18—2 and 12—4), and sentenced to a term of 10 to 15 years imprisonment On appeal, defendant contends that the trial court committed reversible *134error by giving Illinois Pattern Jury Instruction, Criminal No. 3.17, on accomplice testimony in reference to the testimony of defense witness Larry Stuckey; improperly ordered defense testimony stricken on hearsay grounds; and deprived defendant of a fair and impartial hearing through its improper conduct and comments at trial. Defendant also argues that he was not proved guilty of armed robbery where the State failed to establish that any property was taken from the alleged victim.
A detailed account of the facts and circumstances of the robbery is unnecessary to consider the issues defendant has raised. The robbery took place at Crispino’s Food Mart, a small corner grocery, and the principal evidence offered by the State was the testimony of Crispino employees. They described the occurrence and identified the defendant, Kevin O’Neal, as one of the participants. Defendant testified that he had gone to Crispino’s to pick up some milk and cornmeal for dinner. According to the defendant, one of the participants, Larry Stuckey, came up behind him and told him that they were “going to stick up the store.” Defendant said “no” and continued to look for his groceries. However, when he came back up the aisle to the front of the store, another of the participants, Jimmy Ross, pulled out a gun, pointed it at defendant, and told him to “freeze.” Defendant complied, and remained there until he heard a shot from the back of the store, and ran out the front door.
Prior to defendant’s trial, Larry Stuckey appeared in juvenile court, admitted that he had participated in the armed robbery, and was placed on probation. Stuckey was called as a defense witness and testified that he had seen defendant immediately preceding the robbery. According to Stuckey’s testimony, it appeared that defendant was shopping in Crispino’s and was not involved in the robbery, but was ordered at gunpoint to remain in the store until the robbery was completed.
At the request of the State and over defendant’s objections, IPI Criminal Instruction 3.17 was given with reference to the testimony of Larry Stuckey. It states:
“An accomplice witness is one who testifies that he was involved in the commission of a crime with the defendant. The testimony of an accomplice witness is subject to suspicion, and should be considered by you with caution. It should be carefully examined in light of the other evidence in the case.”
Such an instruction is properly given when an accomplice, testifying in behalf of the State, implicates the defendant. The court in People v. Howard (1970), 130 Ill. App. 2d 496, 498, 263 N.E.2d 633, discussed the reason for the instruction:
“The general basis for the rule is the unique relationship between the prosecution and an accomplice. From the relationship there may be a strong potential motivation for an accomplice to seek, *135expect or hope for favorable treatment by the prosecution if his testimony favors the position of the State. Contrarywise [sic], a witness who may be a self-confessed accomplice who exonerates rather than implicates the defendant is risking disfavor by the prosecution and the same reasons * * * do not exist.”
The State argues that, although usually given when an accomplice testifies for the prosecution and against the defendant, an accomplice instruction is properly given when an “accomplice” testifies for the defense as long as such testimony provides “corroborative details” for the State’s case. The States cites People v. Touhy (1935), 361 Ill. 332, 197 N.E. 849, and People v. Legear (1975), 29 Ill. App. 3d 884, 331 N.E.2d 659, as authority. However, in Legear, the “accomplice” witness exonerated defendant as to a burglary charge while implicating him on a theft charge, and the court stated that in such a case, the giving of the instruction was harmless error beyond a reasonable doubt. But the court agreed that:
“* * * as a general rule an ‘accomplice’ instruction should not be given where it derogates from a defendant’s ability to use favorable testimony by a charged accomplice [citation] or where the testimony of an accomplice completely fails to implicate a defendant [citation].”
In the Touhy case, the only objection which the court considered was the narrow one which defendant made at the time the instruction was given, namely that one of the three persons so designated was not an accomplice witness since he had been called by the defendant and not the State. The instruction itself did not include the conclusory definition of an accomplice witness as “* * * one who testifies that he was involved in the commission of a crime with the defendant.” The court did not discuss the reasons for the accomplice instruction nor did it consider the substance of the witness’ testimony in determining the propriety of the instruction. In addition, the instruction directed the jury to pass upon the credibility of the accomplice as they passed on the credibility of any other witness. These cases do not control in a case where the so-called accomplice does not testify that he and defendant were involved in the commission of a crime. As the court stated in People v. Howard (1970), 130 Ill. App. 2d 496, 499, 263 N.E.2d 633:
6 * [T]he effect of the instruction could only have been confusing and prejudicial.
# ” The judicial comment by way of instruction tended to unfairly discredit the principal evidence favoring defendant.”
In an effort to show that the error was not prejudicial, the State points out that the testimony of Larry Stuckey provided “a great deal of corroboration” for the case. However, we cannot agree with the State’s *136characterization of Stuckey’s testimony as corroborating every “significant detail” of the People’s case except “whether or not defendant had his hand in the till.” Whether defendant was a willing participant in the robbery or was ordered at gunpoint to remain in the store is more than a “significant detail”; the answer is determinative of the ultimate question of defendant’s guilt or innocence. Defendant is entitled to be presumed innocent until proved guilty (Ill. Rev. Stat. 1973, ch. 38, par. 3—1); the tendering of an accomplice instruction in a case such as this all but destroys that presumption. Since it cannot be said beyond a reasonable doubt that the result would have been the same had the instruction not been given, defendant’s conviction must be reversed and the cause remanded for a new trial.
Defendant also urges that the trial court erroneously excluded proper defense evidence based on its interpretation of the hearsay rule. Since the question is likely to present itself again upon retrial, we think it appropriate to discuss it here.
Defense witness Larry Stuckey attempted to testify that when he saw defendant inside the store, he told defendant “we was fixing to stick up the store.” Such testimony was ruled a self-serving statement and stricken as hearsay.
Hearsay has been defined as a statement, other than one made by the declarant while testifying at the trial or hearing, offered in evidence to prove the truth of the matter asserted. (Fed. R. Evid. R. 801, 28 U.S.C.A. §801 (1975).) The State argues that Larry Stuckey’s declaration is hearsay. We cannot agree with that characterization of the defense witness’ testimony. The court in People v. Carpenter (1963), 28 Ill. 2d 116, 121, 190 N.E.2d 738, stated:
“The fundamental purpose of the hearsay rule was and is to test the real value of testimony by exposing the source of the assertion to cross-examination by the party against whom it is offered.”
The statement of Larry Stuckey does not fall within the definition of hearsay. It was not offered to prove that Stuckey and his friends were in fact going to “stick up” the store, but to show that defendant was told of the robbery. The value of the testimony rested with the credibility of Larry Stuckey, who was subject to cross-examination. The State had ample opportunity to test the credibility of Larry Stuckey in court and under oath; to question his capacity to observe, his powers of memory, the accuracy of his reporting, and his tendency to lie or tell the truth. (See McCormick, Evidence §245, at 581-84 (2d ed. 1972).) Nor does Stuckey’s declaration constitute a “self-serving” statement; it was not made by a party to the action, and Stuckey can in no way be considered defendant’s agent. The evidence should not have been excluded.
Regarding Stuckey’s testimony that Ross “pulled a gun on Kevin, *137told him he had to stay in the store until the job was over,” the State argues that it was inadmissible hearsay. Again, we cannot agree. It was not inadmissible hearsay, since it was offered not to prove the truth of the matter asserted, i.e., that defendant did in fact remain in the store until the robbery was completed, but to show that Stuckey heard the defendant being ordered at gunpoint to remain in the store. The value of such testimony again rests with Stuckey’s credibility, not on alleged facts intrinsic in the statement.
In light of the foregoing, it is unnecessary to consider the other issues presented by defendant on this appeal.
The cause is reversed and remanded for a new trial.
Reversed and remanded.
STAMOS, P. J., and DOWNING, J., concur.