
313 N.W.2d 497 (1981)
STATE of Iowa, Appellee,
v.
Larry Ray STRABLE, Appellant.
No. 65802.
Supreme Court of Iowa.
December 23, 1981.
*498 Walter W. Rothschild, Waterloo, for appellant.
Thomas J. Miller, Atty. Gen., Michael Jordan, Asst. Atty. Gen., and Eric Knoernschild, Asst. County Atty., for appellee.
Considered by LeGRAND, P. J., and HARRIS, ALLBEE, McGIVERIN and LARSON, JJ.
McGIVERIN, Justice.
Defendant Larry Ray Strable appeals from his conviction of third-degree sexual abuse in violation of section 709.4(4), The Code 1979. He contends that trial court erred 1) by refusing to compel performance of a plea bargain and 2) by permitting the minor victim of the alleged sexual abuse to testify at trial without being subject to defendant's visual observation. We affirm.
Defendant was charged with committing sexual abuse upon his fourteen year old stepdaughter in violation of section 709.4(4). On January 7, 1980, defendant entered a guilty plea to the charge pursuant to a plea bargain under which the State agreed to recommend a ten year sentence and that the sentence be suspended and defendant be given probation including a six month term at a community correctional residential work release facility. On January 17 the trial court sentenced defendant in accordance with the State's recommendation. Defendant started his term at the work release facility.
The State subsequently advised the court that because probation was not an available sentencing alternative for a section 709.4 conviction, the sentence entered was illegal and invalid. Probation cannot be granted for the forcible felony of sexual abuse. §§ 709.4(4), 907.3, 702.11; See State v. Cobb, 311 N.W.2d 64, 67 (Iowa 1981). On January 25 the court vacated the sentence. Then a new plea bargain was negotiated whereby: 1) the information charging defendant with violation of section 709.4 would be dismissed; 2) defendant would withdraw his original plea of guilty; 3) a second information charging defendant with lascivious acts with a child in violation of section 709.8 would be filed by the State; 4) defendant would plead guilty to the new charge; and 5) the State would recommend probation and a term at the residential facility as it had after entry of the guilty plea to sexual abuse.
However, before any of the terms of the second plea agreement were carried out or defendant entered a new guilty plea, the State informed him that it would not carry through with the second plea agreement. This refusal was caused by evidence, which came to the county attorney's attention subsequent to the negotiation of the plea agreement, disclosing that defendant may have instigated incidents of sexual abuse of *499 his stepdaughter by others. Defendant unsuccessfully moved the court to enforce the second plea agreement. Defendant then was allowed to withdraw the guilty plea to sexual abuse that had been entered on January 7 and was released from the residential facility after approximately two months service there.
Thereafter, the sexual abuse charge was tried to the court. Upon motion of the State, and over defense counsel's objection, the court allowed a blackboard to be placed between the victim and defendant while she testified. At the completion of the victim's testimony, defendant's motion to strike her testimony was overruled.
The court found and adjudged defendant guilty of sexual abuse in the third-degree in violation of section 709.4(4) and pronounced sentence as prescribed by the statutes. Strable was given credit on this sentence for the time he spent at the residential facility.
I. Refusal to enforce plea bargain. Defendant contends trial court erred in refusing to require the State to comply with the terms of the second plea bargain. We find no error.
In State v. Edwards, 279 N.W.2d 9, 11 (Iowa 1979), we said, "The State may withdraw from a plea bargain at any time prior to, but not after, actual entry of the guilty plea by defendant or other action by the defendant constituting detrimental reliance upon the arrangement." There was no actual entry of a guilty plea to lascivious acts with a child. Therefore, if there was no detrimental reliance by defendant upon the second plea bargain, that bargain could be withdrawn by the State. We find there was no detrimental reliance by defendant.
Defendant asserts that the time he spent at the work release facility under the initial invalid sentence was detrimental reliance. There are two problems with his position. First, defendant did not rely on the second plea agreement, from which the State withdrew, in serving his sentence. Rather, he relied on the first plea agreement. Detrimental reliance, and corresponding enforcement, on the first plea agreement is not at issue here. Specific performance of the second plea bargain is the issue. There was no reliance on the second plea bargain.
Second, defendant cannot prevail on his detrimental reliance argument when he might be resentenced to the proper sentence after trial. See State v. Howell, 290 N.W.2d 355, 358 (Iowa 1981). To allow defendant to prevail on his detrimental reliance argument here would place the law in "the anomalous situation in which parties could make their own law whenever a judge could be persuaded to allow it." Id. Defendant did not detrimentally rely on the second plea agreement and, therefore, the State was entitled to withdraw its offer before a second guilty plea was entered.
Defendant was permitted to withdraw his guilty plea to sexual abuse after the State refused to comply with the second plea bargain. We find this remedy adequate. State v. Weig, 285 N.W.2d 19, 19-22 (Iowa 1979). He was given credit for the time spent at the residential facility on his final sentence for third-degree sexual abuse. This handling complies with the notions of "fair play" that surround the plea bargaining process in this state. See State v. Kuchenreuther, 218 N.W.2d 621, 624 (Iowa 1974).
We hold that trial court did not err in refusing to require the State to perform the second plea bargain. The State was entitled to retract its offered plea bargain before a guilty plea in compliance therewith was entered and at a time when defendant had not detrimentally relied on that plea bargain.
II. Propriety of blocking defendant's view of witness. Defendant contends that he was denied his right under U.S.Const. amend. VI to confront witnesses when trial court allowed a blackboard to be placed between defendant and the victim during her testimony. We find that any error on this issue was harmless to the defendant.
Trial was to the court without a jury. Pursuant to the wish of the victim, and *500 prior to examination of any witnesses, the State requested that a blackboard be placed as a screen between defendant and the victim, his stepdaughter, age fifteen at trial time, during her testimony. During voir dire of the victim, she told the court it would be difficult or embarrassing for her to testify without the screen. She desired not to have to look at defendant, or vice versa, while she testified. However, she reluctantly told defendant's attorney that it would not be easy but she could testify without the blackboard. The State also requested that the blackboard be used when the younger sister of the victim testified but she later changed her mind and testified without it. Defendant objected that the use of the blackboard would deny him his sixth amendment right of confrontation. Trial court approved the use of the blackboard because of the "tender years of the witnesses" and the nature of the sexual abuse action.
Defendant could consult with his counsel throughout the examination of the victim. He could hear her responses to questions. His counsel and the court could see the witness at all times. Defendant had and exercised the right of cross-examination. Trial court informed defendant's counsel, "the sole purpose of that procedure is just to avoid embarrassment and to aid the witness of tender years to testify about these delicate matters, and it's in no way considered to be placing a greater burden on how you can communicate with your client in these matters." At the close of the victim's testimony defendant moved to strike her testimony, but the motion was overruled.
"In all criminal prosecutions, the accused shall enjoy the right . . . to be confronted with the witnesses against him ...." U.S.Const. amend VI. This right applies to both state and federal criminal prosecutions. Pointer v. Texas, 380 U.S. 400, 403, 85 S.Ct. 1065, 1067, 13 L.Ed.2d 923, 926 (1965). Article I, section 10 of the Iowa Constitution also guarantees the right of confrontation to the criminal defendant.
Because defendant was afforded, and exercised, the right to cross-examine, his argument necessarily is that the sixth amendment confrontation clause guarantees his right to a visual, face to face, confrontation with the victim during her trial testimony in all instances.
The confrontation clause has two purposes.
The main and essential purpose of confrontation is to secure for the opponent the opportunity of cross-examination.The opponent demands confrontation, not for the idle purpose of gazing upon the witness, or of being gazed upon by him, but for the purpose of cross-examination, which cannot be had except by the direct and personal putting of questions and obtaining immediate answers. 5 J. Wigmore, Evidence, § 1395, p. 123 (3rd ed. 1940).
Davis v. Alaska, 415 U.S. 308, 315-16, 94 S.Ct. 1105, 1110, 39 L.Ed.2d 347, 353 (1974) (emphasis added). We have approved this interpretation of the primary purpose of the confrontation clause. State v. Davis, 269 N.W.2d 434, 438 (Iowa 1978); State v. Carney, 236 N.W.2d 44, 46 (Iowa 1975); State v. Brown, 152 Iowa 427, 433, 132 N.W. 862, 864 (1911).
A secondary purpose of the personal appearance of witnesses required by the confrontation clause is that:
[T]he judge and the jury are enabled to obtain the elusive and incommunicable evidence of a witness' deportment while testifying, and a certain subjective moral effect is produced upon the witness . . . . This secondary advantage, however, does not arise from the confrontation of the opponent and the witness; it is not the consequence of those two being brought face to face. It is the witness' presence before the tribunal that secures the secondary advantage . . . .
5 J. Wigmore, Evidence, § 1395 at 153-54 (Chadbourn rev. 1974); McCormick, Law of Evidence, § 252 at 606 (1972). See Mattox v. United States, 156 U.S. 237, 243-44, 15 S.Ct. 337, 340, 39 L.Ed. 409, 411 (1911); Brown, 152 Iowa at 433, 132 N.W. at 864. *501 This secondary purpose "is satisfied if the witness, throughout the material part of his testimony, is before the tribunal where his demeanor can be adequately observed." Wigmore, § 1399 at 199 (emphasis in original). Wigmore found this secondary purpose to be dispensible. Wigmore, § 1395 at 150. Accord, Brown, 152 Iowa at 433, 132 N.W. at 864; People v. Valdez, 82 Cal.App.2d 744, 749, 187 P.2d 74, 77 (1947), cert. denied, 338 U.S. 835, 70 S.Ct. 42, 94 L.Ed. 510 (1947). See United States v. Infelice, 506 F.2d 1358, 1363 (7th Cir. 1974), cert. denied, 419 U.S. 1107, 95 S.Ct. 778, 42 L.Ed.2d 802 (1974) (determination of whether defendant's right to confrontation violated depends upon whether defendant deprived of right to test truth of direct testimony); United States v. Rogers, 475 F.2d 821, 827 (7th Cir. 1973); United States v. Ragano, 476 F.2d 410, 415 (5th Cir. 1973), cert. denied, 427 U.S. 905, 96 S.Ct. 3192, 49 L.Ed.2d 1199 (1976) (confrontation clause not violated if declarant testifies as witness and subject to full and effective cross-examination).
Assuming, without deciding, that trial court should not have allowed the screen to be placed between the witness and the defendant, the error was harmless beyond a reasonable doubt under the standard in Chapman v. California, 386 U.S. 18, 24, 87 S.Ct. 824, 828, 17 L.Ed.2d 705, 711 (1967). See also State v. Cole, 295 N.W.2d 29, 40 (Iowa 1980). Both purposes of the confrontation clause, cross-examination and observation of the demeanor of the witness by the court, who was also the trier of fact, were served in the present case. As stated in People v. Williams, 32 Cal.2d 78, 82, 195 P.2d 393, 395 (1948), cert. denied, 335 U.S. 835, 69 S.Ct. 25, 93 L.Ed. 387 (1948), rev'd on other grounds, People v. Green, 47 Cal.2d 209, 232, 302 P.2d 307, 322 (1956): "The seating arrangement adopted should have been avoided, but it did not deprive the defendants of the rights of confrontation and a public trial." Nothing in the record indicates that use of the screen affected the result of the trial.
Because we find no reversible error, defendant's conviction is affirmed.
AFFIRMED.
