
385 N.W.2d 392 (1986)
STATE of Minnesota, Respondent,
v.
Terry STAFFORD, Appellant.
No. C3-85-1646.
Court of Appeals of Minnesota.
April 22, 1986.
Review Denied June 19, 1986.
*393 Hubert H. Humphrey, III, Atty. Gen., Robert A. Stanich, Sp. Asst. Atty. Gen., St. Paul, John R. Leitner, Aitkin Co. Atty., Aitkin, for respondent.
C. Paul Jones, Public Defender, Anne M. Lewis, Lawrence Hammerling, Asst. State Public Defenders, Minneapolis, for appellant.
Heard, considered and decided by FOLEY, P.J., and SEDGWICK and NIERENGARTEN, JJ.

OPINION
FOLEY, Judge.
Appellant Terry Stafford was convicted of being a felon in possession of a pistol, see Minn.Stat. § 624.713, subd. 1(b) (1984), possession of a short-barrelled shotgun, see Minn.Stat. § 609.67, subd. 1 and 2 (1984), and five counts of attempted first-degree murder, Minn.Stat. §§ 609.185(4), 609.17, 609.05 (1984). On appeal he challenges the sufficiency of the evidence, the instructions and the total aggregate sentence of 495 months. We affirm the convictions and modify the sentence to 480 months.

FACTS
While in jail on burglary and theft charges, Dennis Peterson escaped on November 18, 1984. He was arrested early in the morning on December 7, 1984, attempting to burglarize the Aitkin County Surplus Store. He gave several statements that day to the authorities about his activities since his escape.
He stated that after he escaped he went to Terry Stafford's trailer and stayed there three days. There he saw Eric Hulin and Steve Allen several times. Peterson also went to Hulin's residence several times and saw Stafford there. Peterson claimed that he saw Stafford in possession of a .12 gauge shotgun, Hulin in possession of a .20 gauge shotgun and Allen in possession of a .410 shotgun. Stafford was in possession of the .12 gauge shotgun almost every day and carried it hidden in a coat. Stafford and Hulin told Peterson the guns were for protection from the police, and they told Peterson they would shoot if intercepted by the police. Peterson also claimed that on December 5, 1984, while he and Stafford were driving to Hulin's house, a patrol followed. Stafford told Peterson to be ready to shoot if they were stopped.
Based on Peterson's information, police obtained search warrants for Hulin's farmhouse and Stafford's trailer house to search for various weapons and also obtained arrest warrants for Hulin, Stafford and Allen. Around 11:30 p.m. on December 7, 1984, ten police officers went to Hulin's home on County Road 1 outside Aitkin, Minnesota, to execute the warrants. Aitkin police chief Dick Ryan and Minnesota state trooper William Cloose were assigned to shut off traffic; officers Terry Thompson, Scott Smith and Gary Sommers were stationed outside the house; officers Harold Lucht, Roy Bruggman, Bruce Beck, Dale Gillson and sheriff Bill Sobey were to enter the house.
When the officers arrived at Hulin's house, lights were seen in the main floor and in the basement. The police knew that Hulin's mother, Charlotte, lived in the farmhouse and to ensure her safety, they decided to knock on the door rather than force the door open. As they waited a few minutes outside the breezeway door for a response to their knocking, the basement lights went out. Charlotte Hulin apparently yelled down the basement that the police were on the scene. She opened the door and let the officers in through the breezeway and into the kitchen. Beck remained in the breezeway area.
*394 Meanwhile, a man came walking toward the officers from another area of the house. He was later identified as Keith Robertson, and was quickly removed from the house by police officers.
A "sharp" or "click" noise was then heard from the basement. Sobey hollered down the basement, "Eric, this is Bill Sobey and I have a warrant for your arrest." Receiving no response, Lucht, Sobey and Gillson turned on the basement lights and started down the steps. As Lucht attempted to lift a blue plastic tarp hanging down from the right side of the stairs, he was shot from behind in the hip by someone in the basement. The other officers grabbed and pulled him up the stairs.
As the officers were getting Charlotte Hulin out of the house, a couple of shots were fired from the basement up through the kitchen floor. Several more shots were fired at the officers as they headed for the door. Lucht was hit a second time. Several shots were exchanged. A voice from the basement said, "You are f___ing with the wrong guys, motherf___ers."
Other shots blew Lucht's tie up, knocked his police radio out of his pocket, and blasted Beck's flashlight from the steps. Bruggman was shot in the head. Officers responded by throwing tear gas canisters into the basement. Outside, several officers crouched behind a squad car to avoid the gunshots directed at them. Lucht was hit again, this time in the shoulder. Smith heard a basement window break and saw two muzzle flashes. He shot at the window and yelled that someone was crawling out the window. Another round of gunfire, directed toward the squad car, hit Sommers in the foot and Keith Robertson in the knee. Smith saw someone else crawling out the basement window, and Sobey ordered the officers to "take 'em."
After the shooting died down, two men were lying on the ground. One of them, Eric Hulin, was wounded, and a .20 gauge shotgun was found within arm's reach. He was wearing a long coat and a bandoleer shell holder across his chest containing .20 gauge and .410 gauge shells. The other man on the ground, about 15-20 feet away, was Stafford and he was also wounded. No gun was found on or near him. He was also wearing a bandoleer containing .12 gauge shells under his long coat. Both men were arrested and taken by ambulance to the hospital.
Using airpacks because of the tear gas, police searched the house and found a double-barrelled sawed-off shotgun, a .410 gauge shotgun, a .12 gauge sawed-off shotgun, a 30.06 rifle, empty shells from a .20 gauge casing, weapon pieces, a hand grenade, meat cleaver, knives, a file, and several empty .20 gauge shells.
Over the next two days, crime analysts from the Bureau of Criminal Apprehension investigated the scene. They determined that all shots fired at the officers were from .20 gauge shells and that all the .20 shells recovered were consistent with being fired from the .20 gauge shotgun found near Hulin at his arrest.
Robertson testified that he was a friend of Hulin and Stafford. He testified that in mid-November 1984 he heard Stafford and Hulin discuss the possibility of being arrested by police. Hulin said he would not let them take him alive, and Stafford said he would resist in a fight. Robertson also testified he had seen Stafford hand Hulin a short-barrelled shotgun.
On December 7, the night of the shootout, Robertson was at Hulin's and noticed Hulin may have had a sawed-off shotgun under his long coat because he could see a short piece of it; he thought Stafford may have had a shotgun, too, since his long coat was stiffer on one side. Robertson, Stafford and Hulin drove around that night, and while at a friend's house they did not remove their coats. They returned to Hulin's and went to the basement. Robertson did not see Stafford or Hulin remove his coat and observed that neither one was wearing a bandoleer at that time. After a while, Robertson decided to leave. As he reached the top of the stairs, he saw a squad car. He walked into the house where he was immediately taken outside by police officers.
*395 Stafford did not testify and presented no witnesses. He was convicted of being a felon in possession of a pistol, possessing a short-barrelled shotgun, and on five counts of attempted first-degree murder involving officers Lucht, Bruggman, Sommers, Beck and Sobey;[1] he was acquitted of attempted first-degree murder involving Smith. Stafford was sentenced on the weapons offenses to 22 months, concurrent with a 203 month sentence for the attempted murder of Lucht and four consecutive sentences of 73 months each for the other attempted murders.[2] The aggregate sentence was 495 months.[3]

ISSUES
1. Was the evidence sufficient to sustain appellant's convictions?
2. Did the trial court properly instruct the jury on attempted murder?
3. Did the trial court err in imposing consecutive sentences?

ANALYSIS

I
In examining Stafford's sufficiency of evidence claim, we must examine the evidence by reviewing it in the light most favorable to the verdict. State v. Daniels, 380 N.W.2d 777, 780-81 (Minn.1986). The credibility of witnesses is for the jury to evaluate. Id.

Weapons Offenses
The testimony of Dennis Peterson and Keith Robertson was clearly sufficient to establish that Stafford was a felon in possession of a pistol and that he possessed a short-barrelled shotgun. Although Peterson's credibility was attacked at length in cross-examination and in defense counsel's closing argument, the jury was entitled to give his testimony whatever weight it saw fit.

Attempted Murder
Stafford was charged and tried under alternative theories, either (1) he intended to attempt to kill the officers, or (2) he intended to aid, advise, hire, counsel or conspire with Hulin who intended to attempt to kill the officers.
While there were no direct witnesses who could testify as to who did the actual shooting and it is possible Stafford did not fire any of the .20 gauge shots at the officers, the evidence is overwhelming that Stafford is at least liable for aiding Hulin. Stafford and Hulin were friends who both made statements in each other's presence about their violent plans to resist arrest. Stafford told Peterson that if they were followed by a police officer, they should be ready to shoot if stopped. On the evening of December 7, Robertson thought Stafford had a gun under his long coat. The circumstantial evidence indicates that between the time Robertson left the basement and the time Stafford and Hulin were apprehended, they both put on bandoleers. They remained in the basement together that night wearing similar long coats and bandoleers. There is no evidence whatsoever that Stafford may have worn the bandoleer out of fear of Hulin as he argues on appeal. A .12 gauge shotgun was eventually recovered from the basement near the area where Stafford was seen by Robertson; Peterson testified that Stafford normally carried a .12 gauge shotgun. As the prosecutor argued:

*396 Ask yourself if Mr. Stafford was just some kind of innocent bystander who wasn't having a part in what was going on in that basement, why did he stay down in the dark basement? Why didn't he turn the light back on? Why did he put a bandoleer on? * * *
Why didn't he [Stafford] warn deputy Lucht and the others on the stair? Why didn't he say get out of there, there is danger? If it was Eric who fired the gun, why didn't he grab Eric and holler don't come down here, this guy has a gun?
Stafford would have this court believe, contrary to the jury's verdict, that he was merely an innocent bystander in the wrong place at the wrong time. Ample evidence refutes this, and the evidence clearly supports the conviction for five counts of attempted murder in the first degree.
Once a reasonable inference arises, however, from all the circumstances that defendant was a participant with * * * others in the commission of the crime * * * at that time and place, defendant's guilt is sufficiently established. This inference is a fact question for jury determination * * *.
State v. Bellecourt, 277 Minn. 163, 165, 152 N.W.2d 61, 63 (1967).

II
Stafford claims that the trial court's instructions were confusing and did not clarify that in finding Stafford guilty in aiding Hulin the jury must find Hulin intended to kill the officers beyond a reasonable doubt. Stafford also claims the court instructed the jury that Hulin had an intent to commit first-degree murder.
The trial court instructed the jury on the attempted murder charges as follows:
We will now turn our attention to the charge, six charges of attempted murder in the first degree. Defendant is charged with the offense of attempted murder in the first degree. The crime of murder in the first degree was not consummated or completed. Defendant is charged with the attempt to commit that crime.
The court defined first-degree murder for the jury and explained its elements. In describing the intent element, the court stated that the "defendant must have acted with the intent to kill a peace officer." The court also instructed the jury on the elements of attempt, including the element of intent and the requirement that a substantial step towards the commission of the crime be made.
Next, the court discussed the concept of liability for crimes of another, stating:
A person can be guilty of the actual commission of the crime of attempted murder in the first degree or he can be the one who aided in the crime if proper criteria are met. That criteria is labeled liability of crimes for another. I will now define that concept to you.
Defendant is guilty of a crime committed by another person when defendant had intentionally aided another person in committing it or has intentionally advised, hired or requested or conspired with the other person to commit it. Defendant is guilty of a crime, however, only if the other person commits the crime.
Defendant is not liable criminally for aiding, advising, hiring or conspiring or requesting the commission of a crime unless some crime, including an attempt, is actually committed.
Even if defendant aided, advised, hired, conspired or requested the commission of a crime by another person, defendant is not liable for any crime, including the intended crime, if he abandoned his purpose and made a reasonable effort to prevent the crime before the crime was committed.
The court summarized its instructions as follows:
In summary then, a defendant can either be the person who committed the crime or he can be the person who aided the person in committing the crime if all the criteria are met.

*397 1st. The defendant must have intended to commit or must have intentionally aided or conspired with Eric Warren Hulin with his intent to commit the crime of murder in the first degree.
The Statutes of Minnesota define that crime as follows:
That whoever causes the death of a peace officer with intent to effect the death of that person or another while the peace officer is engaged in the performance of his official duties is guilty of murder in the first degree.
The defendant must have acted or must have aided or conspired with Eric Warren Hulin who acted with intent to kill the following peace officers in performance of their official duties as to the court involving Harold Lucht, a peace officer of Aitkin County, as to the count involving Roy Bruggman, a peace officer in Aitkin County, as to the count involving Gary Sommers, a peace office for Aitkin County, and as to the count involving William Sobey, a peace officer for Aitkin County, as to the count involving Scott Smith, a peace officer for the City of Aitkin, as to the count involving Bruce Beck, a peace officer for Aitkin County.
2nd. Defendant or Eric Warren Hulin must have done an act which was a substantial step towards but more than mere preparation for the commission of that crime.
3rd. Defendant's act, or the actions of Eric Warren Hulin, whom he intentionally aided or conspired with, must have taken place on or about December 7, 1984, in Aitkin County. (Emphasis supplied.)
Instructions were also given on the lesser crime of assault in the second degree; these instructions are not involved in this appeal.
Jury instructions must be viewed in their entirety to determine whether they fairly and adequately explained the law of the case. State v. Jones, 347 N.W.2d 796, 801 (Minn.1984). Viewed in their entirety, the instructions were clear that attempted murder requires an intent to commit murder. The jury was told twice that Stafford could be liable as an accomplice only if the other person commits the crime. There was no improper instruction in this regard.
We are mindful that Stafford claims the court instructed the jury that Hulin acted with intent to kill the peace officers. In its summary the trial court should have more carefully worded this particular statement. However, we are convinced that Stafford's arguments are a "selective and oversubtle" reading of one part of the summary of the instructions. State v. Peirce, 364 N.W.2d 801, 809 (Minn.1985). A fair reading of the entire instructions as given shows the jury was not left with the impression that Hulin did, in fact, intend to kill, but that the jury had to determine this as an element of attempted murder. Viewing the instructions as a whole, the error was not prejudicial requiring reversal.

III
Stafford concedes that the use of consecutive sentencing was proper under Minnesota Sentencing Guidelines and Commentary, II.F (1984). Nevertheless, Stafford claims that the consecutive sentencing exaggerated the criminality of his conduct. We disagree. Stafford either directly or as an aider participated in an ambush of several law enforcement officers who were acting in their official duties as peace officers in executing warrants. He was convicted of attempting to kill five of them. The court stated at sentencing:
The Court is of the opinion that it has a steadfast policy for all the years we have been on the bench that we do not permit people to contest the law in the field. That is the ultimate contest when you attempt to shoot a deputy sheriff.
As a consequence, * * * it is the Court's intention to give the maximum permissible amount of prison time as punishment for this defendant for violating society's law and as a deterrent to others to prohibit and protect police officers in the performance of their duty.
*398 The trial court did not abuse its discretion in sentencing consecutively. State v. Freyer, 328 N.W.2d 140, 142 (Minn.1982); State v. Scott, 373 N.W.2d 661, 663 (Minn.Ct. App.1985), pet. for rev. denied, (Minn. Oct. 24, 1985).
Under Minn.Stat. § 609.15, subd. 2 the total term of imprisonment for a sentence other than a life term shall not exceed 40 years. The State concedes that Stafford's sentence must therefore be reduced from 495 to 480 months.

DECISION
Evidence was sufficient to sustain Stafford's convictions for being a felon in possession of a pistol, possession of a short-barrelled shotgun and five counts of attempted murder in the first degree. The trial court's instructions were not reversible error and its use of consecutive sentencing was not an abuse of discretion. However, under Minn.Stat. § 609.15 the total sentence cannot exceed 40 years. We direct the sentence be reduced from 495 months to 480 months.
Affirmed as modified.
NOTES
[1]  Under Minn.Stat. § 609.185(4) whoever intentionally causes the death of a peace officer while the officer is engaged in performing official duties is guilty of first-degree murder.
[2]  See Minnesota Sentencing Guidelines and Commentary II.G (1984). Stafford had a criminal history score of 6; the 203 months was computed at the high end of the presumptive duration. The 73 months for the remaining four counts were based on a history score of 0 because of the consecutive sentencing. Minnesota Sentencing Guidelines and Commentary II.F (1984).
[3]  In its brief, the public defender asserts that Hulin was found guilty of possession of a short-barrelled shotgun and of 11 counts of attempted first-degree murder. Prior to sentencing, he made a suicide attempt and is currently hospitalized in Duluth.
