
458 N.W.2d 862 (1990)
STATE of Iowa, Appellee,
v.
David Larry TRAMMELL, Appellant.
No. 89-182.
Court of Appeals of Iowa.
May 24, 1990.
Dan T. McGrevey, Fort Dodge, for appellant.
Thomas J. Miller, Atty. Gen., Bruce Kempkes, Asst. Atty. Gen., and James J. Koll, Co. Atty., for appellee.
Considered by DONIELSON, P.J., and HAYDEN and SACKETT, JJ.
HAYDEN, Judge.
Defendant was charged with first-degree murder. Following a jury trial he was found guilty of a lesser-included offense of involuntary manslaughter. He was sentenced to the custody of the Director of the Iowa Department of Adult Corrections for a term not to exceed five years. The sentencing judge ordered this sentence be served independently and consecutively to any sentence served in any other jurisdiction.
The victim was a 21-month-old child. He died from severe injuries to his chest and abdomen. He died two days after the injuries were inflicted. The prosecution alleged defendant had struck heavy blows upon the child on August 26, 1988, which caused his death on August 28, 1988.
Defendant raises two issues on appeal. He claims: 1) reasonable doubt of his guilt was established as a matter of law and the trial court should have entered a verdict of acquittal; and 2) the trial court erred in ordering his sentence be consecutive to any sentence in any other jurisdiction.
Our scope of review is for errors at law. Iowa R.App. P. 4.
We first address defendant's claim the trial court should have entered a verdict of acquittal because there was reasonable doubt of his guilt as a matter of law.
Tonya Fellers, age twelve, was baby-sitting the child on the afternoon of August 26, 1988. Her friend, Michelle Kruger, age eleven, was with Tonya when the defendant came home from work. Mary Weiss, the child's mother, and defendant lived together, but they were not married.
Tonya and Michelle testified Tonya was attempting to rock the child to sleep. Defendant took the child from Tonya's arms and went into a bedroom. They heard two spanking sounds and the child scream out. It sounded like the hit of a diaper.
Defendant left the child in the bedroom crying and went out to play with the dog. The child kept crying and defendant reentered *863 the house, checked on the child, and spanked him two times again, and the child started screaming. Defendant came out of the bedroom and he got another beer out of the refrigerator and stood by the door, then went back into the bedroom and spanked the child two or three times again. During this time the television was on and the defendant had turned the stereo on very loud when he arrived home from work. Tonya and Michelle did not see defendant strike the child as the bedroom door was partially closed. They heard the striking sounds and the child screaming and crying.
After the last episode with the child the defendant again went outside. The child started choking. Tonya sat him up and patted him on the back and he vomited. Defendant reentered the house and took over cleaning the child. The child vomited several more times and there was blood on his mouth. Defendant left to pick up Mary from work. The child vomited repeatedly after that. Later that night he vomited after drinking some water. The next day the child complained of his stomach hurting. On Sunday afternoon, August 28, 1988, Mary observed bruises on the child's stomach and he seemed to be in pain. He awoke from a nap and again vomited repeatedly. The last time he vomited, it was a brown liquid.
Mary took the child to the emergency room at a hospital. The child was unresponsive, limp, and pale. All efforts to revive him failed. He died at 8:00 p.m. that night. Mary testified defendant told her he had spanked the child three times on Friday, August 26, 1988.
Dr. Daniel Cole had delivered the child when he was born. He was the child's family doctor as well as the Webster County Medical Examiner. He was present when the child died. He examined the child and observed around 22 to 24 bruises on the front side of the child's abdomen and chest. It was his opinion the bruises were from one to three days old. Photographs were admitted into evidence depicting these bruises. It was his opinion the child's death was caused by internal bleeding secondary to blunt trauma on the abdomen and chest.
Dr. Thomas Bennett, the Iowa State Medical Examiner, performed an autopsy on the child's body. He also testified the bruises were relatively fresh, from one to three days old. The abdomen was full of blood. There were tears to the liver and to where the intestines attach to the abdominal wall and the spine. Blood vessels inside the abdomen were also torn. It was his opinion the injuries were caused by being struck repeatedly with a blunt instrument. Additionally, it was his opinion they certainly could have been caused by a human fist. Finally, he concluded these injuries resulted from a beating which caused immediate pain and the vomiting. He ruled out an accident as being a cause of death but rather by a beating, and that it was a homicide.
Due process requires the State prove all the elements of a crime beyond a reasonable doubt. The jury is not, however, required to accept the defendant's version of the facts. The principles to be followed in determining sufficiency of the evidence are:
We view the evidence in the light most favorable to the State; all inferences that are fairly and reasonably deducted from the evidence are accepted; and all the evidence, not just that supporting the verdict is considered. Furthermore, the verdict will be upheld if supported by "substantial" evidence, i.e., evidence which would convince a rational trier of fact that the defendant is guilty beyond a reasonable doubt.
State v. Wilkens, 346 N.W.2d 16, 20 (Iowa 1984) (citations omitted). The very function of the jury is to sort out the evidence presented and place credibility where it belongs. The jury is at liberty to believe or disbelieve the testimony of witnesses as it chooses. State v. Blair, 347 N.W.2d 416, 421 (Iowa 1984) (citations omitted).
In applying the required above principles, we determine and hold the verdict is supported by substantial evidence. It is such which would convince a rational trier of fact the defendant is guilty beyond a *864 reasonable doubt. We affirm the trial court on this issue.
Next defendant claims the trial court did not have authority to order his sentence be served consecutively with the sentence of any other jurisdiction.
It was revealed at sentencing defendant had received a deferred judgment on a felony conviction in Texas. Because of this charge in Iowa, Texas authorities were seeking extradition of defendant to revoke the deferred judgment.
We look to the Iowa Code for guidance. The applicable portion of Iowa Code section 903A.5 recites as follows:

An inmate shall not receive credit upon the inmate's sentence for time spent in custody in another state resisting return to Iowa following an escape, or for time served in an institution or jail of another jurisdiction during any period of time the person is receiving credit upon a sentence of that other jurisdiction.

We hold the sentencing judge had authority to order defendant's sentence be consecutive with the sentence of any other jurisdiction. He was merely following the mandate of section 903A.5. Defendant's argument to the contrary is without merit. We affirm on this issue.
AFFIRMED.
