
152 Cal.App.2d 240 (1957)
THE PEOPLE, Respondent,
v.
WILLIAM McKINLEY APPLETON, Appellant.
Crim. No. 2750. 
California Court of Appeals. Third Dist.  
July 2, 1957.
 Jack L. Hammerberg, under appointment by the District Court of Appeal, for Appellant.
 Edmund G. Brown, Attorney General, and G. A. Strader, Deputy Attorney General, for Respondent.
 WARNE, J. pro tem.  [fn. *]
 A jury convicted the defendant of murder in the first degree and fixed the penalty at confinement in the state prison for life. Defendant moved for a new trial and also moved to vacate and set aside the verdict and for modification of the judgment. His motions were denied, and judgment was entered sentencing defendant to imprisonment in the state prison for life. The defendant appeals from the judgment and from the order denying him a new trial.
 On September 21, 1956, in response to a call from the sheriff's office, Police Officer Ellsworth Gordon went to 909 1/2 South "A" Street in the city of Madera. Upon arriving there shortly after 6 p. m., he noticed a colored man, later identified as the defendant, standing near the cabin. The defendant pointed to the cabin and said, "In there." In the rear room of the cabin the officer found the unclad body of the decedent, one Milton Hall, face down on a bed. There were some rags over his head and buttocks. There was considerable blood on the floor and under the bed, and there was blood spattered on the wall. An electric iron was found on the bed near the decedent's head. The defendant having followed the officer into the cabin was asked: "Did you do this?" Defendant, in replying said, "Yes, I did it." He was thereupon placed under arrest and later charged with murder.
 An autopsy was performed which disclosed that decedent's death was caused by tears and contusions of the brain. The autopsy surgeon testified that the injuries to decedent's head were such as could have been caused by blows from an electric iron like the one found on the bed near decedent's head.
 A Mr. Ball testified that he saw the defendant come out of the cabin just prior to the time that the police officer arrived, and that defendant said to him, "Call the law, I have killed my buddy."
 After defendant's arrest, he was taken to the county jail *242 where, in the presence of a court reporter, he was questioned by a police officer concerning the commission of the crime. The court reporter recorded the questions and answers during the interrogation. Both the reporter and the police officer testified that the defendant admitted that he had killed the decedent by striking him on the head with the electric iron, and that he said he did so because he wanted to kill the decedent.
 Testifying in his own defense, the defendant stated that he and the decedent had been drinking wine from about 9 a. m. to noon when the decedent left; that he continued drinking until 3:30 or 4 in the afternoon when he went to the cabin to go to sleep; that the decedent was at the cabin, and the two argued over his (defendant's) condition; that decedent jumped up at him, and as he did so, he, defendant, reached back, grabbed the iron and started swinging; that the decedent fell back on the bed, and as he started to get up he hit him some more. Defendant further testified that he had no intent to kill; that he was "just trying to take care of myself a little bit."
 Defendant first contends that his counsel was improperly restricted by the trial court in his examination of the deputy coroner. On direct examination the deputy coroner testified that on September 21, 1956, he went to the cabin at 909 1/2 South "A" Street in Madera where he saw the body of the decedent on the bed in the rear room. He described the body and identified pictures of it. He stated that he looked around and saw blood spattered over the side of the wall; blood-soaked clothing and blood on the mattress. He noticed that "there wasn't any respiration, and ... the body was cooling." He concluded that the decedent was dead. He then testified that the body was placed on a stretcher and taken to a mortuary where he proceeded to wash and embalm it. He also testified that an autopsy was performed on the body the next day. This covered the entire testimony of the witness on direct examination. [1] On cross-examination he was asked if he took any blood samples from the decedent. He testified that he did so before embalming it. He was then asked what he put the blood samples in. At this point an objection was sustained to the question on the ground that it was not proper cross-examination. We feel that the court properly sustained the objection. "It is generally recognized that the scope of cross-examination should be confined to matters which have been elicited from the witness on direct examination." (People *243 v. Watson, 46 Cal.2d 818, 826 [299 P.2d 243]; also see People v. Melone, 71 Cal.App.2d 291 [162 P.2d 505]; People v. Malicoat, 89 Cal.App.2d 742 [201 P.2d 850].) Since the question did not relate to anything elicited on direct examination, it was not within the scope of proper cross-examination.
 Nor could there have been any prejudice to the defendant since he produced on direct examination of this witness all of the facts concerning the blood sample that he was interested in.
 The defendant next contends that the trial court erred by refusing to permit him to introduce evidence to overcome a prima facie showing by the prosecution that the defendant's confession was free and voluntary prior to the introduction into evidence of such confession.
 As heretofore noted, the prosecution introduced the evidence of a police officer and the court reporter who related a conversation during which the appellant admitted he had killed the decedent and that he did so intentionally. Prior to the introduction in evidence of the testimony concerning such confession, counsel for the defendant requested permission to introduce evidence to rebut the prima facie showing that the statements of the defendant were made freely and voluntarily. The trial court refused to permit the introduction of such evidence at the time, stating that counsel for defendant could introduce such evidence after the confession had been received. While respondent claims that portion of the conversation related by the police officer did not amount to a confession but was merely an admission, he concedes that the entire conversation as related by the court reporter amounted to a complete confession of the crime of murder. Respondent claims that defendant suffered no prejudice by the court's ruling.
 As stated in People v. Gonzales, 24 Cal.2d 870, 876 [151 P.2d 251], "The procedural steps in the matter of receiving confessions in evidence are outlined in the decisions. At the time the confession is offered, it is incumbent on the prosecution to lay the foundation for its introduction by preliminary proof showing that it was freely and voluntarily made. (People v. Soto, 49 Cal. 67; People v. Miller, 135 Cal. 69 [67 P. 12].) Before the confession is received, however, the defendant if he requests it must be accorded the opportunity to introduce evidence to overcome the prima facie showing, and if incrimination is dependent upon the confession a refusal of the court to permit such opportunity may constitute prejudicial error. *244 (People v. Gibson, 28 Cal.App. 334 [152 P. 316]; People v. Columbus, 49 Cal.App. 761, 763 [194 P. 288]; cf. People v. Miller, supra [135 Cal. 69 (67 P. 12)]; People v. Eli, 131 Cal.App. 482 [21 P.2d 654]; People v. Crowl, 28 Cal.App.2d 299 [82 P.2d 507].) It is the function of the court in the first instance to resolve any conflict in the evidence on the subject (People v. Jim Ti, 32 Cal. 60; People v. Oliveria, supra [127 Cal. 376, 381 (59 P. 772)]), and if the court concludes that the confession was not free and voluntary it has the power and is in duty bound to withhold it from the jury's consideration. However, if there is evidence that the confession was free and voluntary, it is within the court's discretion to permit it to be read to the jury, and to submit to the jury for its determination the question whether under all the circumstances the confession was made freely and voluntarily. (People v. Oliveria, supra; People v. Zarate, 54 Cal.App. 372 [201 P. 955].) In such a case the court passes preliminarily on the question of the voluntary nature of the confession and its admissibility and although it may determine that the confession is voluntary and admissible, its ruling is not binding on the jury; and it is for that body 'to determine in the last analysis whether a confession is freely and voluntarily made.' (People v. Fouts, 61 Cal.App. 242, 245 [214 P. 657]; People v. Black, 73 Cal.App. 13 [238 P. 374]; People v. Dye, 119 Cal.App. 262, 270 [6 P.2d 313].) The jury determines the issue of the nature of the confession, that is, whether it is voluntary or involuntary, on all the evidence on the issue; and the court is not required to receive evidence out of the hearing of the jury for the purpose of determining preliminarily the question of admissibility. (People v. Black, supra; People v. Nelson, 90 Cal.App. 27 [265 P. 366]; People v. Leavitt, 127 Cal.App. 394, 398 [15 P.2d 894] ...)"
 It appears that the defendant, testifying in his own behalf, was permitted to testify fully concerning the circumstances under which he made the statement. He testified that he was taken to a hospital where a blood sample was taken from his arm. He was then returned to the jail and told that the police wanted a statement from him. He testified that his only reason for giving the statement was that he was "scared." He was asked what he thought would happen to him if he did not give a statement, and in answering he testified, "Well, I didn't know exactly, I was scared, and I had heard of a time when a fellow had been beaten, you know, and I was scared and went on back there." (Referring then to the room *245 in the jail where the statement was given.) He testified that he gave the statement, but that it was false. Defendant makes no claim that he was threatened with any violence or that he was promised any leniency. There is nothing in the record to indicate that the statement was not freely and voluntarily given.
 [2] Although the trial court's ruling was erroneous, we are nevertheless of the opinion, after a thorough examination of all the evidence in this case, and particularly defendant's explanation of the circumstances under which the statement was given, that no trial judge would have excluded the testimony as to the statement or confession had he heard the defendant's testimony before ruling upon its admissibility. Nor can it be said that the action of the trial court in the premises worked a miscarriage of justice; hence the challenged ruling is not ground for reversal. (Cal. Const., art. VI,  4 1/2.)
 The judgment and the order denying a new trial are affirmed.
 Van Dyke, P. J., and Schottky, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
