*759OPINION
By the Court,
This is an appeal from an order of the district court denying, for the second time, post-conviction relief to Stocks who, on February 26, 1969, pleaded guilty to the sale of a narcotic drug and currently is serving a ten-year sentence at the Nevada State Prison. The record of the arraignment shows that after the information was read to Stocks, the court inquired, “What is your plea?” to which Stocks replied, “Guilty, Your Honor.” The court accepted his plea without any further inquiry. Stocks was represented by counsel.
1. His first petition for relief from the conviction and sentence was on the ground that the record of his arraignment *760does not show that his plea was voluntarily and understandingly entered since the court failed to make the kind of inquiry constitutionally required by the United States Supreme Court decision of Boykin v. Alabama, 395 U.S. 238 (1969). In Boykin, the court noted that several constitutional rights are involved in a waiver that takes place when a plea of guilty is entered: the privilege against compulsory self incrimination, the right to trial by jury, and the right to confront one’s accusers. A waiver of these significant federal rights may not be presumed from a silent record. In Boykin, as here, the defendant was represented by counsel. There, as here, the court merely accepted the accused’s guilty plea. Boykin’s conviction was set aside by the High Court.
Boykin was decided June 2, 1969. The guilty plea with which we are here concerned was entered on February 26, 1969. The district court denied Stocks’ first petition for relief, and this court dismissed his appeal therefrom. Although reasons were not given for either decision, we properly may assume that each rested upon the proposition that the doctrine of Boykin is not to receive retroactive application. Indeed, in June 1970 we so ruled. Mathis v. Warden, 86 Nev. 439, 471 P.2d 233 (1970).
2. Following the denial of Stocks’ first post-conviction petition and the dismissal of his appeal, he filed a second petition seeking to void his conviction because of the failure of the district court to meet statutory requirements in accepting his guilty plea. The relevant part of NRS 174.035(1) provides that the court shall not accept a guilty plea “without first addressing the defendant personally and determining that the plea is made voluntarily with understanding of the nature of the charge and the consequences of the plea.” This challenge, based upon the mentioned statute, was not asserted in his first post-conviction petition. In Rogers v. Warden, 86 Nev. 359, 468 P.2d 993 (1970), we ruled that the failure of the petitioner to explain why he did not assert the grounds of his second petition for relief in his first petition, barred his second application. That decision rested upon NRS 177.375 and the desire to finalize litigation. Although the petitioner did not offer such an explanation in his second application for relief, that explanation may be inferred from the record before us. His first petition was presented without the assistance of counsel, which might well explain his failure to call relevant statutory requirements to the attention of the court. When counsel was secured and the second petition submitted, this inadequacy was corrected. We could deny review upon *761the rule of Rogers, supra. In this instance, however, we choose to entertain the matter and resolve some recurring problems incident to the acceptance of guilty pleas.
The unrebutted affidavit submitted by Stocks in support of his petition for relief suggests that he was induced to plead guilty by his counsel's advice that he might be charged as an habitual criminal if he did not so plead. Moreover, he seems to contend that the district court was required under NRS 174.035(1) to advise him that parole was not available to one charged and sentenced for habitual criminality. NRS 213.110(1); Eisentrager v. State Board of Parole, 85 Nev. 672, 462 P.2d 40 (1969). He argues that such advice from the court falls within the statute as a “consequences of the plea” of guilty to the charge of sale of a narcotic drug.
Each contention is unsound. Advice from his counsel that he might be charged as an habitual criminal does not, of itself, destroy the voluntary nature of his guilty plea to the crime with which he was charged. A guilty plea is not compelled and invalid under the Fifth Amendment when motivated by the defendant’s desire to accept certainty or probability of a lesser penalty rather than to face the possibility of a higher penalty. Brady v. United States, 397 U.S. 742 (1970). The voluntariness of his plea is to be determined by considering all relevant circumstances surrounding it. There is nothing in the record to suggest that his will was overborne, or that he was unable to weigh alternatives. He was represented by competent counsel. The possibility of being charged as an habitual criminal should not weigh heavily if he were not guilty of the primary offense, since proof of guilt of the primary charge is a precondition to a subsequent habitual hearing.
The statutory direction that the judge determine the defendant’s understanding of the consequences of his plea does not embrace the possible habitual criminal charge and the consequences flowing therefrom. Stocks was not charged as an habitual criminal. His guilty plea was to the sale of a narcotic drug. Parole is now unavailable to him because of prior convictions and not as a consequence of his guilty plea to the charge made. Anushevitz v. Warden, 86 Nev. 191, 467 P.2d 115 (1970).
Our statute, NRS 174.035(1), is patterned after Rule 11 of the Federal Rules of Criminal Procedure. The Federal rule has received the attention of the United States Supreme Court. *762Its purpose is to insure that every defendant who pleads guilty receives the procedural safeguards of the rule which are designed to facilitate the determination of voluntariness, and to provide a complete record at the time the plea is entered of factors relevant to that determination. McCarthy v. United States, 394 U.S. 459 (1969); Halliday v. United States, 394 U.S. 831 (1969). When the inquiry contemplated by the Boykin decision, by the Federal rule and by our statute, is made it “forestalls the spin-off of collateral proceedings that seek to probe murky memories.” Boykin v. Alabama, id., at 244.
McCarthy and Halliday do not rest upon constitutional grounds. In each instance, the High Court especially noted this fact. The concern of the Court was with Federal Rule 11 as applied to Federal criminal cases. Neither case suggests the application of its doctrine to state criminal cases. Only the Boykin inquiry regarding the waiver of fundamental trial rights —the privilege against compulsory self incrimination, the right to trial by jury, and the right to confront one’s accusers— is constitutionally required when a guilty plea is accepted. This would be so in Federal cases absent a Rule 11, and in state cases absent a statute such as NRS 175.035(1). Thus, we are free to place our own construction upon the meaning to be given our statute.
Of course it is desirable that full inquiry accompany the acceptance of a guilty plea in every case. A complete explanation of the charge, the range of sentence therefor, an explanation of the waiver of the constitutional trial rights noted in Boykin, the possibility of probation, the eligibility for parole, and other matters bearing upon voluntariness, are appropriate and desirable subjects for court advice to the accused. When explained at arraignment and a guilty plea follows, there exists practically no basis for a post-conviction charge that the plea was involuntarily entered. The record of the arraignment refutes such a charge. The court, state or federal, to whom such a post-conviction challenge is addressed, may deny it upon the record alone without an evidentiary hearing. This is the goal we seek to achieve by the arraignment procedure.
It does not follow, however, that our statute requires all that is desirable. It does not require that much. It does require that the accused understand the nature of the charge against him and the consequences of his plea thereto, that is, the sentence *763authorized for that crime. Collateral consequences do not fall within the sweep of the statute. Anushevitz v. Warden, 86 Nev. 191, 467 P.2d 115 (1970); Mathis v. Warden, 86 Nev. 439, 471 P.2d 233 (1970). And, from and after June 2, 1969, the constitutional gloss of Boykin v. Alabama is to be imposed upon the meaning of the phrase “consequences of the plea.”
As before noted, the Boykin doctrine does not touch this case since it is not to receive retroactive application. Thus, it appears that the fault of the court in accepting the guilty plea of Stocks lies in its failure to advise him of the sentence authorized for the crime of selling a narcotic drug. Stocks, however, does not complain of this error, presumably because his counsel advised him on that score. In this context, the error is harmless. NRS 177.255. His substantial rights were not affected.
3. The court below suggested that NRS 174.035(1), is unconstitutional as a legislative interference with the judicial function. We reject this suggestion pre-emptorily. Our code is loaded with legislative direction to the courts concerning criminal procedure. This is constitutionally permissible. O’Banion v. Simpson, 44 Nev. 188, 191 P. 1083 (1920), as to the legislative regulation of the method by which the right to trial by jury is to be enforced; and State v. McClear, 11 Nev. 39 (1876), as to the legislative direction of the mode of impaneling juries are two examples. Indeed, our State Constitution art. 4, §§ 20, 21, provides for the legislative enactment of general laws “regulating the practice of courts of justice.” And, in Marshall v. Warden, 83 Nev. 442, 434 P.2d 437 (1967), we upheld the constitutionality of our Post-Conviction Remedy Act (of which 174.035(1) is a part) with a minor exception not here relevant.
Other contentions offered to us on this appeal have been examined and found to be without substance.
Affirmed.
Collins, C. J., Zenoff, Batjer, and Mowbray, JJ., concur.