
245 N.W.2d 510 (1976)
STATE of Iowa, Appellee,
v.
Rodney Lee CEASER, Appellant.
No. 59174.
Supreme Court of Iowa.
September 22, 1976.
Paul T. Shinkle, Cedar Falls, for appellant.
Richard C. Turner, Atty. Gen., and David H. Correll, County Atty., for appellee.
Submitted to MOORE, C.J., and MASON, LeGRAND, UHLENHOPP and HARRIS, JJ.
LeGRAND, Justice.
This is yet another appeal challenging the validity of a guilty plea.
Two issues are raised. Defendant contends, first, that the trial court incorrectly advised him concerning one of the elements of the crime with which he was charged. He says this renders his plea and the subsequent sentence invalid. His second claim is that the sentence should be set aside as excessive. We affirm.
According to the minutes of testimony attached to the information, which defendant concedes correctly set forth what happened, defendant and a confederate entered a store in Waterloo while a third man remained in a getaway car outside. The confederate was armed with a gun. The clerk was tied and bound after being ordered to lie down on the floor. It appears defendant removed $185 from a cash register. The two also robbed a customer who unfortunately entered the store during the holdup.
I. At the time defendant entered his plea the following exchange took place between the prosecuting attorney and the trial court:
"MR. WALKER: Your Honor, before you get a response from the defendant [as to a plea] may I request the Court also advise that it is not necessary that he alone possess a gun; * * * [H]e could be in concert with another person so he fully understands the nature of the offense.
"THE COURT: Mr. Ceaser, the Court will advise you that the offense may be established by competent evidence showing that these acts were done in your presence and with your knowledge, do you understand that? "THE DEFENDANT: Yes. "THE COURT: Even though they may not have been done by you, yourself, do you understand that? "THE DEFENDANT: Yes."
It should be noted the trial court did not advise defendant on the matter suggested *511 by the county attorneythat he could be guilty of the crime charged even though he himself was unarmed. Instead the trial court told defendant his knowledge of, or presence at, the crime was enough to establish his guilt. Defendant arguescorrectly, we believethis was error. See State v. Jellema, 206 N.W.2d 679, 682 (Iowa 1973) and State v. Barnes, 204 N.W.2d 827, 828 (Iowa 1972). We hold, however, the error was without prejudice and was harmless beyond a reasonable doubt. Defendant is not entitled to relief on that ground. See State v. Nelson, 234 N.W.2d 368, 372 (Iowa 1975).
This case is distinguishable from State v. Wall, 239 N.W.2d 548, 549 (Iowa 1976). In Wall, the court's incorrect explanation omitted an element vital to establishing defendant's guilt. Under such circumstances, we refused to say the misstatement was harmless beyond a reasonable doubt.
In the present case, the error would have been important only if defendant's guilt depended on mere knowledge or presence; but he admits much more. He acknowledged he and a confederate committed the acts alleged in the information. This included an admission the confederate was armed. Defendant actively participated in the robbery. Both he and his partner were masked. Money was removed from the till during the holdup. Both took part in robbing a customer. Under the record before us, the trial court's statement could not have been a factor in defendant's decision to plead guilty.
Neither do we think, in this case, failure to explain that if his confederate was armed the law considers defendant as being armed too renders the plea invalid. State v. Oberbreckling, 235 N.W.2d 121, 122 (Iowa 1975); State v. Bedell, 220 N.W.2d 891, 892 (Iowa 1974).
We find no merit in defendant's claim of reversible error under this division.
II. We have reviewed defendant's other complaint concerning the sentence imposed. Defendant pled guilty and was sentenced under § 711.2, The Code, to a term of not more than 25 years in the penitentiary. Defendant argues he was entitled to probation because of his youth and because his drug habit was really the reason he committed this crime. He says probation would better serve the interests of society because it would permit more effective treatment for his addiction.
The record indicates the trial court considered and rejected defendant's plea for probation, at the same time offering to communicate defendant's request for treatment to the proper authorities with a recommendation that it be given favorable consideration. We believe this course was well within the court's sentencing discretion. See State v. Peckenschneider, 236 N.W.2d 344, 348 (Iowa 1975) and State v. Smith, Iowa, 244 N.W.2d 325, filed July 30, 1976.
III. Finding no reversible error, we affirm the judgment of the trial court.
AFFIRMED.
