
344 N.W.2d 562 (1983)
STATE of Iowa, Plaintiff-Appellee,
v.
Evan Cordell KING, Defendant-Appellant.
No. 69205.
Court of Appeals of Iowa.
December 27, 1983.
Raymond E. Rogers, Asst. Appellate Defender, for defendant-appellant.
Thomas J. Miller, Atty. Gen., and Lona Hansen, Asst. Atty. Gen., for plaintiff-appellee.
Heard by OXBERGER, C.J., and SNELL and SACKETT, JJ.
SNELL, Judge.
Defendant Evan Cordell King was convicted of second-degree burglary which arose from a family dispute. Defendant and his wife, Melody, had been married since 1974. They separated in 1980. Apparently by arrangement, Melody had physical, though not legal, custody of the couple's three children. Defendant had visited the children regularly until June 1981.
Melody was involved in a car accident and sent the three children to stay with her parents, Leonard and Karen Moeller, in Denmark, Iowa. Defendant telephoned the Moellers, asking to see the children. They told him to arrange it with his wife. Both *563 Evan and Melody then decided to file for divorce. Defendant's wife called her parents and told them she had filed for divorce, although she had not, and that she had a restraining order to keep defendant away from the children, which she did not.
Defendant and his brother drove to Denmark. Whether they were invited to enter the Moeller's home or just walked in is disputed; in any event, it is undisputed that those present initially engaged in friendly conversation about the children, and Mr. Moeller went to the kitchen to get a glass of iced tea. Mrs. Moeller testified that she had no objection to defendant being in the house to see his children.
When defendant announced he intended to take the children, the Moellers refused. It is unclear how the fight started, but defendant and his brother overpowered Moeller, and Moeller testified that defendant struck him repeatedly after he was helpless. Moeller sustained two broken ribs and numerous bruises. His testimony implied he may have made first contact. Defendant and his brother succeeded in leaving with the children.
First-degree burglary charges were brought against defendant and his brother. They were tried jointly; at trial the facts set out above were brought out. Defendant moved for a directed verdict; the motion was overruled.
The jury found defendant guilty of second-degree burglary. He was sentenced to pay a fine of $2,500 and given a suspended term of imprisonment of up to ten years.
Defendant asks us to reverse the trial court conviction because he alleges that the State presented insufficient evidence to prove that the defendant entered the home of his parents-in-law illegally or with the intent to commit assault. The standard of review in challenging the sufficiency of the evidence is well established. See State v. Welton, 300 N.W.2d 157, 159-60 (Iowa 1981); State v. Robinson, 288 N.W.2d 337, 339 (Iowa 1980). We will uphold a verdict if there is substantial evidence in the record tending to support the charge. State v. Aldape, 307 N.W.2d 32, 39 (Iowa 1981); State v. Schrier, 300 N.W.2d 305, 306 (Iowa 1981). Keeping in mind the principle that the credibility of witnesses and the weight to be given their testimony is a function of the factfinder, Robinson at 341, we are unable to find "such evidence as could convince a rational trier of fact that the defendant is guilty beyond a reasonable doubt." Id. at 339. Accordingly, we reverse.
Section 713.1 of the Iowa Code defines burglary as occurring when:
Any person, having the intent to commit a felony, assault or theft therein, who, having no right, license or privilege to do so, enters an occupied structure or ... who remains therein ... after the person's right, license or privilege to be there has expired, or any person having such intent who breaks an occupied structure, ... commits burglary.
Iowa Code § 713.1 (1981). Defendant contends the Moellers acquiesced to defendant's presence in the house and therefore there was implied consent to enter. We agree. Even though defendant and his brother may not have been formally invited into the house, once inside, they engaged in ordinary conversation with the Moellers. The Moellers refused to allow defendant to take the children with him, but apparently they never told him or inferred that he should leave the house. It seems that defendant was given license to remain therein. Thus, the State did not prove the element of entry without consent.
Defendant also argues that the State did not prove the element of specific intent. The State is required to prove beyond a reasonable doubt the felonious intent of the accused when he entered the house. State v. Morelock, 164 N.W.2d 819, 822 (Iowa 1969). The State claims that defendant's later actions in assaulting Leonard Moeller belie his earlier intentions. However, we do not find sufficient evidence to support this hypothesis. On the contrary, it is evident that defendant's intention was to obtain possession of his children. *564 This would not constitute felonious intent because he was the natural father of the children and there was no legal custody decree limiting his parental rights.
Because the State failed to present sufficient evidence to prove two elements of the crime of burglary in the second degree, we reverse.
REVERSED.
