
208 Kan. 236 (1971)
491 P.2d 900
STATE OF KANSAS, Appellee,
v.
LONNIE RIDGE, Appellant.
No. 46,103
Supreme Court of Kansas.
Opinion filed December 11, 1971.
Tom Boone, of Leavenworth, argued the cause and was on the brief for the appellant.
Patrick J. Reardon, County Attorney, argued the cause, and Vern Miller, Attorney General, and R.B. Miller, III, Special Prosecutor, were with him on the brief for the appellee.
The opinion of the court was delivered by
SCHROEDER, J.:
This is an appeal in a criminal action wherein the appellant was charged as principal and as an accessory before the fact with the offense of aggravated assault upon a guard at the Kansas State Penitentiary (K.S.A. 21-431). Judgment and sentence were pronounced after the appellant entered a plea of guilty.
On the 7th day of October, 1968, a guard by the name of Travis J. Adams was seriously injured by bricks and a large piece of cement that were dropped on him from above in one of the cell houses at *237 the Kansas State Penitentiary. Numerous inmates were charged with felonious assault, among them the appellant. All of the inmates under suspicion were put in solitary confinement and were only removed from such quarters to go to court.
The complaint against the appellant was filed on March 28, 1969, in the city court of Leavenworth. The complaint was read to him on the 7th day of April, 1969, and he appeared without counsel for a preliminary hearing on the 10th day of April, 1969. As a result of the preliminary hearing the appellant was bound over to the Leavenworth County district court to stand trial on the charge of felonious assault.
On the 24th day of April, 1969, an information charging the appellant with felonious assault was filed in the district court of Leavenworth County, and on the 5th day of June, 1969, an attorney was appointed to represent him. Thereafter the various motions were filed by the appellant as follows: On July 17, 1969, he filed a motion to quash the information; on November 17, 1969, he filed a motion to be removed from solitary confinement; on the 16th day of December, 1969, he filed a motion for a psychiatric evaluation; and also on the 16th day of December, 1969, he filed a motion to require the state to elect as to whether the state would proceed against him on the charge as a principal or as an accessory. In due course the trial court, after having given the appellant an opportunity to be heard on these motions, denied all of them. However, it gave the appellant an opportunity upon request to present any evidence as to his incompetency to stand trial. The final action on these motions was taken on the 8th day of January, 1970.
On the 16th day of January, 1970, the appellant appeared in the district court of Leavenworth County with his court-appointed counsel and entered a plea of guilty to the offense of felonious assault as charged in the information. The trial court found the plea of guilty was voluntarily, knowingly and understandingly made, and found the appellant guilty as charged in the information. The appellant was thereupon sentenced to confinement for not less than one nor more than ten years, said sentence to run consecutively to any sentences pursuant to which he was in confinement. From the conviction and sentence appeal has been duly perfected, assigning four specifications of error.
The appellant first contends the trial court erred in denying his *238 motion to require the state to elect "whether the defendant acted as a principal or accessory as charged in the information."
K.S.A. 21-105 (repealed July 1, 1970) was the law applicable to the appellant herein. It provides as follows:
"Every person who shall be a principal in the second degree in the commission of any felony, or who shall be an accessory to any murder or other felony before the fact, shall upon conviction be adjudged guilty of the offense in the same degree and be punished in the same manner as herein prescribed with respect to the principal in the first degree."
The trial court held the appellant was not charged with separate and distinct offenses, and that the state could not be compelled to elect under these circumstances. In this the trial court did not err.
In State v. Yohe, 203 Kan. 855, 457 P.2d 12, this court discussed 21-105, supra, as follows:
"Our statute removes any common-law penalty distinctions for participating in a crime as an accessory before the fact or as a principal in the second degree. An accessory before the fact and a principal in the second degree are guilty of the offense and are to be punished the same as the principal in the first degree...." (p. 857.)
There is nothing in the record to show that the failure of the trial court to require the state to elect was prejudicial to the appellant. He was charged with only one offense and he pleaded guilty.
The appellant next contends the trial court erred in refusing to require the prison officials at Lansing, Kansas, to remove him from solitary confinement pending trial. It has been held that confinement in isolation and segregation alone is not sufficient to support a determination that a plea of guilty is not freely and voluntarily entered. (Knight v. State, 203 Kan. 652, 455 P.2d 578; Davis v. State, 204 Kan. 372, 461 P.2d 812; Lee v. State, 204 Kan. 364, 461 2d 794; and State v. Jenkins, 197 Kan. 651, 421 P.2d 33.)
While the argument of appellant's counsel seems to indicate that he was subjected to some hardship by virtue of his confinement in the Adjustment and Treatment Building, there is nothing in the record to show he was subjected to such hardship as would tend to overbear his will or tend to induce a coerced or involuntary plea of guilty. The record does not reflect the appellant was subjected to any physical abuse by the prison officials, nor that he was subjected to any threats or promises that he would be released from the Adjustment and Treatment Building if he entered a plea of guilty.
*239 In this case the appellant had the advice of counsel prior to and at the time he entered his plea of guilty. The trial court determined the appellant's plea was freely and voluntarily given at the time it was entered, and the appellant made no objection at the time of allocution. (See Craig v. State, 198 Kan. 39, 422 P.2d 955.)
The appellant also complains that the trial court erred in refusing to order a psychiatric examination pursuant to K.S.A. 1969 Supp. 62-1531.
The foregoing statute (repealed July 1, 1970) was the law applicable at the time the appellant entered his plea of guilty. It provides in part as follows:
"Whenever any person under indictment or information, and before or during the trial thereon, and before verdict is rendered, shall be found by the court in which such indictment or information is filed, or by a commission or another jury empaneled for the purpose of trying such question, to be insane, an idiot or an imbecile and unable to comprehend his position, and to make his defense, the court shall forthwith commit him to the state security hospital for safekeeping and treatment; . .."
Counsel for the appellant contends when a prison inmate is placed in solitary confinement for long periods of time pending trial he loses touch with reality and has difficulty assisting counsel in the defense of the action. It is argued that a preliminary investigation should be made where the trial court learns from observation, reasonable claim or credible source that there is a real doubt as to the defendant's mental condition to comprehend his situation or make his defense.
An accused is presumed to be sane for the purpose of standing trial, absent a finding in accordance with the provisions of the above statute. (McQueeney v. State, 198 Kan. 642, 426 P.2d 114, and cases cited therein.)
In State v. Childs, 198 Kan. 4, 422 P.2d 898, the mental ability of an accused to stand trial was discussed as follows:
"In this jurisdiction the sanity of an accused, for the purpose of his being put on trial, is determined by his present ability to comprehend his position, understand the nature and object of the proceedings against him, and to conduct his defense in a rational manner. Thus, if the accused is capable of understanding the nature and object of the proceedings pending against him, if he comprehends his own condition with reference to such proceedings, and can conduct his defense in a rational manner, he is, for the purpose of being tried, to be deemed sane, although on some other subject his mind may be deranged or unsound. (K.S.A. 62-1531; Van Dusen v. State, 197 Kan. 718, 421 P.2d 197; State v. Wheeler, 195 Kan. 184, 403 P.2d 1015; State v. Cox, 193 Kan. 571, 396 P.2d 326, cert. denied 380 U.S. 982, 14 L.Ed.2d 276, *240 85 S.Ct. 1350; State v. Kelly, 192 Kan. 641, 391 P.2d 123; State v. Severns, 184 Kan. 213, 336 P.2d 447.)" (pp. 7, 8.)
Here the trial court saw the defendant at the time of trial and correctly stated the law in its memorandum opinion. The trial court in its memorandum stated that no allegation was made or evidence presented in support of the appellant's motion to indicate that he was insane, unable to comprehend his position, or unable to make his defense. Furthermore, the trial court stated it would permit the appellant to present any evidence in support of his motion for a psychiatric examination to determine his competency to stand trial, but none was presented. The district court, being fully aware of the appellant's mental condition by reason of his solitary confinement, found no real doubt as to the appellant's mental capacity to stand trial.
The court stated in Van Dusen v. State, 197 Kan. 718, 421 P.2d 197:
"... Many shades and degrees of mental illness may appear in the disposition of a criminal case. Evaluation thereof is best left in the sound discretion of the trial court which is in much better position to do so than an appellate court...." (p. 726.)
We cannot say the district court abused the exercise of its power of discretion in denying the appellant's motion for an order requiring that he be given a psychiatric examination.
Lastly, the appellant contends the failure to appoint an attorney to represent him at the preliminary hearing was error.
This court has repeatedly held that under Kansas procedure an indigent accused does not have a constitutional right to counsel at his preliminary hearing, and failure to provide counsel at such time is not error in the absence of a showing of prejudice to the substantial rights of the accused. (Stewart v. State, 206 Kan. 147, 476 P.2d 652, and cases cited therein.)
The record herein fails to show any evidence indicating the appellant's rights were prejudiced by his failure to have an attorney appointed for him at the preliminary hearing.
It must also be noted that an accused's voluntary plea of guilty to the charge against him constitutes a waiver of any alleged irregularities occurring at the preliminary stage of the proceedings. (Allen v. State, 199 Kan. 147, 427 P.2d 598.)
The judgment of the lower court is affirmed.
O'CONNOR and PRAGER, JJ., not participating.
