Relator, by counsel, filed his petition for a writ of habeas corpus alleging that he is confined and unlawfully detained in Western State Penitentiary by virtue of a sentence imposed by the Court of Oyer and Terminer of Fulton County of not less than one and one-half years nor more than three years on a charge of statutory rape. Rules were *195issued upon respondent and upon the District Attorney of Fulton County to show cause why a writ of habeas corpus should not issue. Copies of all papers were also sent to the office of the Attorney General of the Commonwealth of Pennsylvania. The Attorney General and the district attorney have filed a motion to discharge the rule and dismiss the petition and an answer to the petition. By agreement of counsel for relator and the district attorney a hearing was dispensed with and oral argument was heard by the court.
In paragraphs 4 to 11, inclusive, of his petition relator complains of acts occurring prior to his appearance in court, including the fact that he was arrested without a warrant; that he was not taken before a justice of the peace until the day following his arrest; that no information was filed until the day after his arrest; that information was made upon information received and failed to state prosecutor’s belief in its truth; that the justice’s transcript shows that a hearing was waived before the information was signed and sworn to; that there is doubt as to whether the justice held a preliminary hearing and whether there was probable cause for holding defendant; that if a hearing was held the only evidence before the justice of the peace was that of the officer, which was hearsay. At the argument relator’s counsel conceded that these allegations are without merit in view of the subsequent proceedings in court and he did not press them. The sufficiency or irregularity of proceedings prior to a true bill returned by a grand jury or a bill of indictment and the entry of a plea of guilty thereon should first be raised by timely application to the trial court and not in a petition for a writ of habeas corpus: Commonwealth ex rel. Geisel v. Ashe, Warden, 165 Pa. Superior Ct. 41 (1949).
The real complaint of relator is set forth in paragraphs 12 and 13 of the petition. It is there alleged *196that relator was sentenced as on a plea of guilty but that, while a bill of indictment was prepared by the district attorney, no plea of guilty was entered thereon and, on the contrary, a plea of not guilty was entered on the bill and signed by relator. Therefore, it is contended that since there was not substantial compliance with the provisions of the Act of April 15, 1907, P. L. 62, the sentence imposed upon relator is void for want of jurisdiction in the court to impose the sentence. It is not denied that relator was guilty of the crime charged or that he did enter a plea of guilty thereto.
The records of the court show that on August 19, 1952, the district attorney prepared a bill of indictment to O. & T., October term, 1952, no. 3, charging defendant with statutory rape and that endorsed on the back of the bill of indictment is a waiver of presentment and indictment by the grand jury and a plea of not guilty. This endorsement was signed by defendant. The court minutes of September 16, 1952, recite:
“Defendant comes before the Court, and not being represented by counsel, Merrill W. Kerlin, Esq., is appointed; Defendant enters a plea of guilty.”
Sentence was then imposed upon the plea. The minutes are preceded by the caption of the case including the term and number and the charge against defendant. The docket entries contain the same information. The answer to relator’s petition, filed by the district attorney, sets forth in more detail what occurred on those two occasions but the facts set forth therein need not be considered in passing upon the matter at this time.
The Act of April 15, 1907, P. L. 62, as amended by the Act of June 15, 1939, P. L. 400, 19 PS §241, provides that when any person, charged with the commission of crime, is willing to waive indictment by the grand jury and shall notify the district attorney to *197that effect, no bill of indictment shall be sent to the grand jury, but the district attorney shall at once prepare a bill in the usual form, “and the plea of guilty or not guilty, as the case may be, shall, at the request of the said defendant or defendant’s counsel be entered thereon, and the court of the proper county at any session thereof, shall thereupon, if the plea is guilty, forthwith, impose sentence for the offense set forth therein, and, if the plea is not guilty, bring the defendant to a speedy trial with or without a jury as provided by law: . . .
A formal accusation is essential for every trial for crime and ordinarily this is in the form of an indictment returned by the grand jury. See Sadler Criminal Procedure, sec. 201. Upon the return of an indictment by the grand jury defendant is required to plead thereto and subsequent proceedings are had on the record thus made. The original Act of 1907 made provision for defendant who desired to plead guilty to the charges against him without the delay and expense of having the case submitted to the grand jury and a formal indictment returned. It provided that when he notified the district attorney to that effect no bill of indictment should be sent to the grand jury but that a bill should be prepared in the usual form and the plea of guilty should be entered thereon, and the court should thereupon impose sentence for the offense set forth therein. This statute was followed by the amendment of June 15, 1939, P. L. 400, 19 PS §241, which permitted a person charged with commission of crime to waive indictment by the grand jury and to plead either guilty or not guilty. It provided for the preparation of a bill in the usual form and for the entry thereon of defendant’s plea, and for sentence for the offense set forth therein if the plea be guilty, or for a speedy trial with or without a jury if the plea be not guilty.
*198In each of the instances where proceedings were to be had upon an indictment not returned by the grand jury it was required that defendant’s plea be entered on the indictment prepared by the district attorney. In Commonwealth ex rel. Mayernick v. Ashe, 139 Pa. Superior Ct. 421, 422 (1940), it was said that the entering of a plea on the indictment and the signing thereof by defendant “attests his request that the plea of guilty be so entered. These are safeguards, designed to avoid any uncertainty as to what the defendant was charged with and to what he pleaded guilty”.
But, where an indictment is returned by the grand jury a plea of guilty thereto made in open court need not be entered on the bill of indictment, although that practice is recommended: Commonwealth ex rel. Billings v. Ashe, 144 Pa. Superior Ct. 209 (1941). Under the Act of May 15, 1895, P. L. 71, 19 PS §462, arraignment of defendants in courts of oyer and terminer was abolished except where the indictment charges murder, and defendant “shall only be required to plead orally or by writing endorsed on the indictment”.
The rights of defendant are protected and certainty as to the crime with which he is charged and to which he is pleading is provided by the formal return of the indictment and by the records of the court.
Since the amendment of 1939 permits a defendant to waive indictment by the grand jury and to plead either guilty or not guilty to the charges against him, an indictment prepared under the terms of the statute upon which is entered the waiver of indictment and the plea of defendant is virtually the same as an indictment regularly returned by the grand jury insofar as subsequent proceedings are concerned. The endorsements on the bill take the place of the grand jury’s return and document the bill of indictment as the charge against defendant upon which further proceedings are to be based. When, therefore, defendant in *199the present case waived indictment by the grand jury and endorsed his formal plea of not guilty on the bill of indictment the case was ready to be proceeded with as though he had been regularly indicted and had entered a plea of not guilty. When he subsequently decided to change his plea of not guilty to a plea of guilty and entered his new plea in open court he was in the same position as a defendant who had been regularly indicted by a grand jury and entered a plea of not guilty on arraignment and thereafter in the midst of his trial entered a plea of guilty in open court. The rights of defendant are fully safeguarded by the record and there can be no uncertainty as to the charge to which he pleaded guilty and upon which he was sentenced by the court. There was a substantial compliance with the Act of 1907 as amended by the Act of 1939.
Under the Act of 1907 the courts have held that where the record in its entirety leaves no ground for uncertainty as to the crime to which relator pleaded guilty and is sufficient that on a possible subsequent prosecution for the same offenses he could show by the record in connection with such pleas that he had previously answered for them, the sentence was valid and relator was not entitled to be discharged. In Commonwealth ex rel. Slifko v. Ashe, 144 Pa. Superior Ct. 593 (1941), the bill of indictment was not signed by the district attorney and no plea of guilty was entered thereon or signed by defendant, but the records of the case including the stenographic transcript of what transpired at sentence “lead to the conclusion that the relator entered his plea of guilty in open court in such a manner as to leave no ground for uncertainty as to the crimes to which he then and there pleaded guilty, ...".
In Commonwealth ex rel. Dende v. Ashe, Warden, 144 Pa. Superior Ct. 598 (1941), the indictments were *200not signed by the district attorney and the rubber stamp impression on the back of the indictment containing the plea of guilty was not signed by defendant. However, the sentences were endorsed on the indictment and initialed by the sentencing judge; the transcript of the testimony at the time of sentence included a complete statement of the offenses; and the docket entries, which were similar to the entries in the present case, identified the charges by name and term and number and set forth the plea of guilty in open court. This was held to be sufficient. In Commonwealth ex rel. Moore v. Ashe, Warden, 341 Pa. 555 (1941), defendant signed a paper containing a caption which included his name, term and number, the name of the charge (forgery), the amount of the check, and the prosecutor’s name. Then followed a statement signed by him acknowledging his guilt and stating that he did plead guilty. This paper was later attached to a bill of indictment which was then prepared, but no plea of guilty was entered on the bill. The court held that the records showed sufficient compliance with the requirements of criminal procedure to clothe the court with jurisdiction to impose the sentence. In the present case defendant’s waiver of indictment and plea of not guilty signed by him on the back of the bill of indictment, and the subsequent docket entries to the same term and number setting forth his name, the charge against him, and the entry of the plea of guilty in open court, leave no ground for uncertainty as to the crime to which he pleaded guilty in open court, and there was sufficient compliance with the requirements of criminal procedure to clothe the court with jurisdiction to impose the sentence.
In the cases cited by defendant there was no record such as exists in the present case. In Commonwealth ex rel. Fagan v. Francies, 53 Pa. Superior Ct. 278 (1913), no indictment was prepared and defendant’s *201plea of guilty was merely endorsed on the transcript of the justice of the peace. Furthermore, there was uncertainty as to the charge to which defendant pleaded guilty and for which he was sentenced. In Commonwealth ex rel. Penland v. Ashe, 142 Pa. Superior Ct. 403 (1940), a rubber stamp was impressed on the back of the indictment but it was undecipherable and was not signed by relator nor attested by the court. Consequently there was no record to show that defendant pleaded guilty to that indictment In Commonwealth ex rel. Mayernick v. Ashe, Warden, 139 Pa. Superior Ct. 421, 422 (1940), a rubber stamp was also used but the blank spaces were not filled in and the plea was not signed by defendant. In each of these cases it was held that there was not substantial compliance with the Act of 1907 and relator was discharged. In the present case relator is protected by the indictment bearing his endorsement and by the record of the subsequent proceedings before the court entered to the same term and number under his name and containing a statement of the charge.
The situation here presented is not similar to that in Commonwealth ex rel. Thor v. Ashe, Warden, 138 Pa. Superior Ct. 222 (1939), cited by relator. While the entry of a nolle prosequi on an indictment puts the case out of court until the nolle prosequi is retracted or withdrawn with permission of the court, a plea of not guilty does just the opposite — it places the case in court for further proceedings.
It is to be noted that defendant does not deny having entered a plea of guilty and does not deny his guilt of the charge against him. He seeks to be released upon the narrow technical ground that his plea of guilty was not endorsed on the indictment. We conclude that no rights of defendant have been impaired and that the record in its entirety shows sufficient compliance with the requirements of criminal procedure to clothe *202the court with jurisdiction to impose the sentence challenged.
And now, May 19,1953, the Commonwealth’s motion to discharge the rule to show cause and to dismiss the petition for a writ of habeas corpus is granted; the rule to show cause is discharged and the petition is dismissed.