Defendant contends that the trial court erred in finding that Carl Edward Greene was competent to testify. We disagree. The competency of a witness rests largely in the court’s discretion. State v. Benton, 276 N.C. 641, 174 S.E. 2d 793 (1970). The test of competency is the capacity to understand and to relate under oath facts which will assist the jury in finding the ultimate facts. State v. Cooke, 278 N.C. 288, 179 S.E. 2d 365 (1971). On voir dire the court below heard the testimony of three physicians, two of them psychiatrists, who had examined Greene both before and after the robbery occurred. The court found that “Carl Edward Greene knows the difference between right and wrong and is able to understand the obligations of an oath.” The court also found that “he is able to understand the physical facts about what is going on around him . . . [and] has sufficient mental capacity to correctly receive and impart his impressions of matters which he has seen and heard.” We find no abuse of discretion in the court’s ruling.
Defendant next contends that the court erred in allowing the District Attorney to withdraw Greene from the witness stand, discuss with him his testimony, and then continue his direct examination. He argues that the State was allowed to impeach its own witness. Again we disagree. As explained by the North Carolina Supreme Court in State v. Anderson, 283 N.C. 218, 195 S.E. 2d 561 (1973), the trial court may permit the district attorney to cross-examine an unwilling witness, for the purpose of refreshing his recollection, by reference to prior statements. This, in effect, is what the State sought to do in the case at bar. The court cautioned the District Attorney that he could not impeach his witness and would have to resume direct examination when he returned. The record shows that, after conferring with the District Attorney, Greene only enlarged upon and did not contradict his earlier testimony. It was not error to allow the State to enable the witness to testify correctly.
Defendant further contends that the court erred in denying his motions for judgment as of nonsuit. This contention is with*275out merit. The rule, as set forth in State v. Ham, 238 N.C. 94, 97, 76 S.E. 2d 346, 348 (1953), is as follows:
“To render one who does not actually participate in the commission of a crime guilty of the offense committed, there must be some evidence tending to show that he, by word or deed, gave active encouragement to the perpetrator of the crime or by his conduct made it known to such perpetrator that he was standing by to lend assistance when and if it should become necessary.”
Viewed in the light most favorable to the State, the evidence presented was sufficient to be submitted to the jury. See State v. Walker, 269 N.C. 135, 152 S.E. 2d 133 (1967).. The perpetrator of the crime, Carl Edward Greene, testified that defendant suggested robbing a beer-truck and said he knew the driver. He rode with the other defendants in a green and white Ford to the Polynesian Lounge and remained in the car nearby while the robbery was taking place. Defendant’s motions for nonsuit were properly overruled.
Finally, .defendant contends that the court erred in instructing the jury that the State had offered evidence which tended to show that “both Greene and defendant Reginald Williams ran to the back of the lounge where the red [sic] and white Ford car was parked, waiting for them.” He argues that there was no evidence that the car was in fact waiting and that the court violated G.S. 1-180 by expressing an opinion that this fact had been proven. We disagree. The recapitulation was based upon a state of facts presented by a reasonable view of the State’s evidence. See State v. Jennings, 276 N.C. 157, 171 S.E. 2d 447 (1970).
Defendant has received a fair trial free from prejudicial error.
No error.
Chief Judge Brock and Judge Parker concur.