
33 Cal.3d 754 (1983)
661 P.2d 1081
191 Cal. Rptr. 1
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF MARIN COUNTY, Respondent; DAVID FREDERICK MENDELLA, Real Party in Interest.
Docket No. S.F. 24492.
Supreme Court of California.
April 25, 1983.
*756 COUNSEL
George Deukmejian and John K. Van de Kamp, Attorneys General, Robert H. Philibosian, Chief Assistant Attorney General, William D. Stein, Assistant Attorney General, W. Eric Collins, Eugene Kaster and Robert R. Granucci, Deputy Attorneys General, for Petitioner.
No appearance for Respondent.
Ruth L. Young, Public Defender, and Glenn D. Becker, Deputy Public Defender, for Real Party in Interest.
OPINION
MOSK, J.
The People seek a writ of mandate to compel respondent superior court to vacate its order granting defendant's motion to set aside a portion of an information. The primary question presented is whether an enhancement allegation may be challenged by a motion to dismiss under Penal Code section *757 995.[1] We conclude that such a motion is a proper vehicle to test the sufficiency of evidence to support an enhancement allegation.
Defendant was charged by complaint with a violation of section 245, subdivision (a) (assault with a deadly weapon or by force likely to produce great bodily injury); no enhancement for great bodily injury (§ 12022.7) was charged at that time. The evidence presented at the preliminary hearing reveals the following factual background.

I
Brion Ward, the victim, went to defendant's home to retrieve some of Linda Bisco's belongings. Although Bisco was then Ward's paramour, she had previously been living with defendant. Ward, unaware that defendant was home, entered using Bisco's key. He was confronted by defendant who was carrying at his side a sword with a two-and-a-half-foot blade. Defendant demanded that Ward leave immediately; while backing out of the house, Ward attempted to reason with defendant. As Ward reached the doorstep, defendant thrust forward with the sword, penetrating Ward's chest and puncturing his lung. Ward's injuries required surgery and five days of hospitalization. At the time of the preliminary hearing, Ward continued to suffer occasional pain in his shoulder from the injury, but had otherwise recovered.
Defendant admitted having stabbed Ward but claimed that it was an accident and that he had not realized the sword was so sharp. He testified that "I had no idea a sword had that kind of momentum to go through a person that way. I thought if I touched him it would just push him back." Defendant stated that he intended to scare Ward off but not to injure him.
The magistrate held defendant to answer for the assault and denied a motion to reduce the charge to a misdemeanor (§ 17, subd. (b)(5)). The magistrate's factual findings indicate he was skeptical of defendant's testimony that he did not intend to cause the injury.
The information filed in superior court added to the original assault charge an allegation that defendant intentionally inflicted great bodily injury (§ 12022.7). Defendant moved to dismiss this allegation on two grounds: (1) there was insufficient evidence adduced at the preliminary hearing to support the enhancement and it should therefore be dismissed under section 995;[2] or alternatively, (2) an "enhancement" not charged by the complaint may not be added after the preliminary hearing because, under section 739, the prosecution may charge *758 only "offenses" in the information.[3] The court granted the motion on the latter ground.

II
(1a) In People v. Superior Court (Grilli) (1978) 84 Cal. App.3d 506 [148 Cal. Rptr. 740], the court held that a great bodily injury enhancement could "not be the subject of a motion to dismiss made pursuant to section 995.... [I]t is clear from judicial analysis of analogous enhancement statutes (§§ 12022, 12022.5) that [§ 12022.7's] provisions do not define a crime or offense but relate to the penalty to be imposed under certain circumstances." (Id. at p. 512.) Grilli relied heavily on language taken from opinions that discuss in general terms the standards for setting aside an information. "Numerous cases have held that an examination under section 995 ... is limited to determining `if there is some rational ground for assuming the possibility that an offense has been committed and the accused is guilty of it.' (Caughlin v. Superior Court (1971) 4 Cal.3d 461, 464 [93 Cal. Rptr. 587, 442 P.2d 211], italics added; People v. Hall [1971] 3 Cal.3d [992,] 996 [92 Cal. Rptr. 304, 479 P.2d 664]; Rideout v. Superior Court (1967) 67 Cal.2d 471, 474 [62 Cal. Rptr. 581, 432 P.2d 197].)" (Id. at p. 513.) Thus Grilli concluded that an enhancement, not being an "offense," is not subject to section 995 review.
As we recently noted in Ramos v. Superior Court (1982) 32 Cal.3d 26, 32, footnote 8 [184 Cal. Rptr. 622, 648 P.2d 589], the Grilli reasoning has "been subjected to considerable criticism." In Ramos, we declined to express a view on the validity of the Grilli holding; it is now necessary to consider the issue directly. We conclude that the reasoning of Grilli does not withstand careful analysis; the opinion must therefore be disapproved.
Section 995 provides that the information must be set aside if the defendant has been "committed without reasonable or probable cause." Nowhere in the statute is a distinction drawn between "offense" and "enhancement"; in fact, the term "offense" is not mentioned. As noted by other courts, the language cited by Grilli to support its "offense" analysis consists only of "general textual statements made in three Supreme Court decisions involving drug charges with no enhancements. In each, the court was merely stating that an information would not be set aside if there was some rational ground for assuming the possibility that an `offense' was committed. [Citations.] None gave any suggestion of how the Supreme Court would rule on a motion to dismiss an allegation *759 of acts not strictly considered an `offense.'" (Ervin v. Superior Court (1981) 119 Cal. App.3d 78, 84-85 [173 Cal. Rptr. 208].)
Over seven decades ago Justice Holmes aptly warned, "It is one of the misfortunes of the law that ideas become encysted in phrases and thereafter for a long time cease to provoke further analysis." (Hyde v. United States (1912) 225 U.S. 347, 391 [56 L.Ed. 1114, 1135, 32 S.Ct. 793] [dis. opn. of Holmes, J.].) The mere fact that the word "offense" has often appeared in opinions discussing the application of section 995 lends no persuasive support to the Grilli rationale for limiting the reach of such motions to exclude enhancements.
It bears emphasis that "the preliminary examination is not merely a pretrial hearing." (Jones v. Superior Court (1971) 4 Cal.3d 660, 668 [94 Cal. Rptr. 289, 483 P.2d 1241].) "Rather, it is a proceeding designed to weed out groundless or unsupported charges of grave offenses and to relieve the accused of the degradation and expense of a criminal trial." (People v. Brice (1982) 130 Cal. App.3d 201, 209 [181 Cal. Rptr. 518]; accord, Jennings v. Superior Court (1967) 66 Cal.2d 867, 880 [59 Cal. Rptr. 440, 428 P.2d 304]; Jaffe v. Stone (1941) 18 Cal.2d 146, 150 [114 P.2d 335, 135 A.L.R. 775].) To fulfill this function, the defendant is permitted at the preliminary hearing, if he chooses, to dispute the charges, confront witnesses, challenge the prosecution's evidence, and present evidence in his defense. (Hawkins v. Superior Court (1978) 22 Cal.3d 584, 587, 592-593 [150 Cal. Rptr. 435, 586 P.2d 916]; Jones v. Superior Court, supra, 4 Cal.3d 660, 668.) These procedural guarantees serve to implement the defendant's due process right to a pretrial determination of probable cause.
To allow the prosecution to indiscriminately charge enhancements without subjecting such allegations to judicial scrutiny under a section 995 motion is to undermine the procedural rights guaranteed to the defendant by the preliminary hearing process. "The obvious purpose of section 995 is to eliminate unnecessary trials and to prevent accusatory bodies such as grand juries from encroaching on the right of a person to be free from prosecution for crime unless there is some rational basis for entertaining the possibility of guilt." (People v. Sigal (1967) 249 Cal. App.2d 299, 305 [57 Cal. Rptr. 541]; accord, Greenberg v. Superior Court (1942) 19 Cal.2d 319 [121 P.2d 713].) Thus, together the preliminary hearing and the section 995 motion operate as a judicial check on the exercise of prosecutorial discretion.
The preliminary hearing and the section 995 motion are not, however, limited to this function of screening out groundless prosecutions. "It is of at least equal, and often far greater, importance that the defendant not be charged excessively.... [¶] To deny that the defendant is prejudiced by such exercises *760 of prosecutorial discretion is to overlook the serious increase in a defendant's burden of standing trial on the greater charge, the tactical advantage conferred upon the prosecutor in respect to plea bargaining ... and the various collateral effects of the more serious accusation itself. An adequate screening procedure must be concerned with these problems of the overcharge as well as of the wholly unfounded charge." (Graham & Letwin, The Preliminary Hearings in Los Angeles: Some Field Findings and Legal Policy Observations (1971) 18 UCLA L.Rev. 635, 742-743; People v. Bird (1931) 212 Cal. 632, 640-644 [300 P. 23].)[4]
These concerns are equally applicable to overcharging in the form of adding enhancements. A finding that even a single enhancement is true can have a significant impact on the number of years to which a defendant may ultimately be sentenced. (E.g., § 12022  additional one year; § 12022.3  additional two or three years; § 12022.5  additional two years; § 12022.6  additional one or two years; § 12022.7  additional three years; § 12022.8  additional five years.) Thus, as recognized by the Ervin court, "these allegations may constitute powerful bargaining tools for the prosecutor. Evidence to support the allegations can often be presented easily during presentation of the prosecution's evidence on the basic offenses. Yet if it is not presented, and indeed if it does not exist, the defendant may remain under the threat of a long sentence during the entire plea negotiation process." (Ervin v. Superior Court (1981) 119 Cal. App.3d 78, 86 [173 Cal. Rptr. 208].)[5]
The negative effects on a defendant of potentially overcharged enhancements extend, moreover, beyond the realm of plea bargaining considerations and into the trial itself. If the charging of enhancements is unreviewable, the defendant may suffer prejudice from the introduction of evidence at trial on an enhancement issue when the evidence is irrelevant to his guilt of the substantive offense. Further, "at trial the defendant may be asked to defend against allegations, the proof for which was withheld at the preliminary hearing. Even if the *761 prosecution has presented all its evidence at the preliminary hearing, there is a threat the jury will accept evidence concerning allegations that should have been `weeded out' by the magistrate or superior court judge in pretrial proceedings." (Id. at p. 86.) (2) (See fn. 6.) It is therefore beyond dispute that there must be a method to challenge misuse of enhancement allegations: "A section 995 motion provides such a quick and efficient remedy." (Jackson v. Superior Court (1980) 110 Cal. App.3d 174, 177 [167 Cal. Rptr. 749] [use of § 995 motion to challenge misapplication of § 17, subd. (b)(5)].)[6]
(1b) In addition to the practical and policy considerations discussed above, decisional law provides support for this result. In Ghent v. Superior Court (1979) 90 Cal. App.3d 944 [153 Cal. Rptr. 720], the court held that a section 995 motion could be used to attack the sufficiency of the evidence to support a special circumstance allegation. The People's contention in Ghent was identical to that raised here, i.e., that section 995 motions are available only to challenge an "offense" and not a special circumstance allegation which is not itself a separate offense. The Ghent court rejected this argument, concluding that in light of the potential consequences of the special circumstance allegation both the defendant and the People have a compelling interest in assuring that the prosecution of such an allegation does not proceed without an adequate probable cause showing. (Id. at pp. 953-954; accord, Jones v. Superior Court (1981) 123 Cal. App.3d 160, 173 [176 Cal. Rptr. 430]; Page v. Superior Court (1979) 90 Cal. App.3d 959, 971 [153 Cal. Rptr. 730].)
In Ramos v. Superior Court, supra, we approved of Ghent and extended its reasoning to a dismissal by a magistrate (§ 871)[7] in a special circumstance case in which the death penalty was not sought. (Ramos v. Superior Court, supra, 32 Cal.3d 26, 33.) In Ramos, the People conceded the applicability of section 995 review under Ghent but maintained that special circumstance allegations should not be subject to dismissal by the magistrate under section 871. (Ibid.) Despite the fact that section 871, in contrast to section 995, explicitly uses the term "offense," we rejected the distinction: "The ultimate question under both sections 871 and 995 ... is whether the evidence presented at the preliminary hearing is sufficient to bring the defendant to trial on the charges against him, and the prosecution neither cites authority, nor gives persuasive reasons, to support the claim that the magistrate's authority under section 871 should be truncated...." (Id. at p. 34.)
*762 Essentially we concluded that the use of the term "offense" in section 871 was not sufficient to preclude its application to a special circumstance allegation. In so doing, we refused to adopt a narrow construction of the term "offense." (3) (See fn. 8.) A holding in the instant case that limited the scope of section 995 motions to exclude enhancements would therefore be inconsistent with the Ramos result.[8]
(1c) Moreover, we recognize that prior to the enactment of the determinate sentencing law (DSL) certain enhancement provisions were contained in the statutory definitions of the particular offenses. (See former § 209, Stats. 1973, ch. 719, § 8, p. 1300; § 213, Stats. 1967, ch. 149, § 1, p. 1216.) It appears that under these statutes courts had no difficulty with challenges to the "enhancement" portion of the charge pursuant to section 995. In People v. Soto (1977) 74 Cal. App.3d 267 [141 Cal. Rptr. 343], the complaint did not contain any allegation to suggest that the People were seeking the enhanced punishment prescribed by statute for kidnaping to commit robbery with bodily harm. (Former § 209.) The information, however, included an allegation of bodily harm in connection with the kidnaping charge. The trial court granted a section 995 motion to strike the bodily harm clause. (Soto, supra, at pp. 270-272.) The appellate court stated simply that "[i]n this case the defendants sought to limit the gravity of the charges at every opportunity, and they were entitled to a ruling on the merits in response to their motion in the superior court." (Id. at p. 274.)
Similarly, in People v. Superior Court (Vasquez) (1977) 69 Cal. App.3d 14, 18 [137 Cal. Rptr. 762], disapproved on other grounds in People v. Caudillo (1978) 21 Cal.3d 562, 587 [146 Cal. Rptr. 859, 580 P.2d 274], the People sought review of an order setting aside two sentence-enhancing allegations, one in connection with a count of robbery (former §§ 211, 213) and the other with a kidnaping charge (former § 209). The court noted that both the great bodily injury and the bodily harm allegations were types of punishment enhancements. (Vasquez, supra, at p. 19.) Despite this characterization of the allegations as "enhancements" rather than "offenses," the court did not question that the allegations were subject to challenge under a section 995 motion. Accordingly, it proceeded without further discussion to review the merits of the superior *763 court's determination that the evidence was insufficient to support the charged enhancements.
As we have seen, before the enactment of the DSL, allegations that could increase punishment, such as personal use of a firearm, great bodily injury, or being armed with a deadly weapon, were spread throughout the Penal Code; some were contained in the definitions of particular crimes (see, e.g., former §§ 209, 213, 460, 461), while others merited separate sections (see, e.g., former §§ 3024, 12022, 12022.5). With the advent of the DSL, the provisions for such allegations were deleted from the definitions of the substantive offenses, were placed in distinct sections, and are now known as "enhancements." (See, e.g., § 12022, 12022.5, 12022.6, 12022.7; Cassou & Taugher, Determinate Sentencing in California: The New Numbers Game (1978) 9 Pacific L.J. 5, 23, 31.)
The DSL was designed to revise the Penal Code with regard to sentencing. Nothing in its history or form intimates that the Legislature intended by reorganizing the Penal Code to deprive the defendant of any procedural rights that he possessed prior to the new law. More specifically, there is no indication that the Legislature meant to change the procedures of preliminary hearings and section 995 motions to deprive the defendant of the opportunity for pretrial challenges of enhancement allegations. As noted, the only decisional law we have located that considers the question in any manner implies that, prior to the DSL, section 995 motions were a proper vehicle to challenge such penalty-enhancing allegations. (People v. Soto, supra, 74 Cal. App.3d 267; People v. Superior Court (Vasquez), supra, 69 Cal. App.3d 14.) We see no reason why this practice should be altered merely because "enhancements" are now contained in separate sections of the Penal Code rather than in the definitions of the underlying substantive offenses.
For all of the foregoing reasons, we hold that a section 995 motion may properly be used to challenge the sufficiency of evidence to support an enhancement allegation.

III
We note that the trial court based its dismissal of the great bodily injury enhancement allegation on the language of section 739. The court purportedly relied on the Grilli rationale that under section 995 an "enhancement" was not considered an "offense." It reasoned because section 739 explicitly uses the term "offense," section 739, to be consistent with Grilli, must be read restrictively. The court therefore concluded that section 739 precluded the charging of an enhancement in the information that was not charged by the original complaint. In view of our conclusion that the scope of section 995 motions encompasses enhancements, this reasoning is no longer tenable.
*764 The People seem to fear that if Grilli is disapproved, they will be forced to charge all possible enhancement allegations in the complaint.[9] The People also correctly note, however, that "California law under sections 739 and 1009 and relevant cases permit amendment of the information to add charges or enhancements which are supported by the actual evidence at the preliminary hearing, provided the facts show due notice by proof to the accused." (Talamantez v. Superior Court (1981) 122 Cal. App.3d 629, 634 [176 Cal. Rptr. 800]; accord, People v. Manning (1982) 133 Cal. App.3d 159, 165 [183 Cal. Rptr. 727] [§ 739]; People v. Hall (1979) 95 Cal. App.3d 299, 314 [157 Cal. Rptr. 107] [§ 1009]; People v. Spencer (1972) 22 Cal. App.3d 786, 799 [99 Cal. Rptr. 681] [§ 1009]; People v. Grigsby (1969) 275 Cal. App.2d 767, 771-772 [80 Cal. Rptr. 294] [§ 1009].)
(4) Under section 739, "[t]he law is settled that unless the magistrate makes factual findings to the contrary, the prosecution may amend the information after the preliminary hearing to charge any offense shown by the evidence adduced at the preliminary hearing provided the new crime is transactionally related to the crimes for which the defendant has previously been held to answer." (People v. Manning, supra, 133 Cal. App.3d 159, 165; accord, People v. Encerti (1982) 130 Cal. App.3d 791, 799 [182 Cal. Rptr. 139]; People v. Donnell (1976) 65 Cal. App.3d 227, 231-232 [135 Cal. Rptr. 217].) "Under the case law interpreting section 1009, the test applied is whether or not the amendment changes the offense charged to one not shown by the evidence taken at the preliminary examination. (People v. Crosby [1962] 58 Cal.2d 713, 723 [25 Cal. Rptr. 847, 375 P.2d 839].)" (People v. Spencer, supra, 22 Cal. App.3d 786, 799.) As long as the above standards are met, there is no bar to adding to the information enhancement allegations that were not charged in the complaint. In the present case, these requirements were fulfilled: first, it is beyond question that the great bodily injury allegation (by definition an enhancement of the underlying offense) was transactionally related to the assault charge; second, the totality of the circumstances at the preliminary hearing adequately put defendant on notice of the potential charge of great bodily injury.
(5) The remaining issue to be resolved is whether the evidence introduced at the preliminary examination was in fact sufficient to support a charge under section 12022.7. Although the magistrate was not compelled to make a finding on the issue because it was not charged by the complaint, he nevertheless explicitly rejected defendant's contention that he lacked the specific intent to inflict *765 great bodily injury. The magistrate explained that his examination of the physical evidence (i.e., the sword), prior threats against the victim by defendant, and the extent of the injury, were all inconsistent with defendant's claimed lack of intent. In addition, although obviously not basing its ruling on this point, the superior court judge also concluded after reading the preliminary transcript, that "frankly ... I think there's enough evidentiary support for the enhancement."
Under these circumstances, there would be little purpose in remanding the cause to the superior court to determine the merits of the sufficiency question on the section 995 motion; the implied finding in the statement cited above plainly indicates how that court would resolve the issue. We have independently reviewed the preliminary hearing testimony and agree that the record contains sufficient support for the enhancement allegation to withstand a section 995 challenge.
Let a peremptory writ of mandate issue as prayed.
Bird, C.J., Kaus, J., Broussard, J., Reynoso, J., and Grodin, J., concurred.
Richardson, J., concurred in the result.
Petitioner's application for a rehearing was denied June 1, 1983, and the opinion was modified to read as printed above. Richardson, J., was of the opinion that the application should be granted.
NOTES
[1]  Unless otherwise indicated, all statutory references hereinafter are to the Penal Code.
[2]  Section 995 provides in relevant part that the "information must be set aside by the court in which the defendant is arraigned, upon his motion" if it is determined that "the defendant had been committed without reasonable or probable cause."
[3]  Section 739 provides in pertinent part: "When a defendant has been examined and committed, as provided in Section 872, it shall be the duty of the district attorney ... to file ... an information against the defendant which may charge the defendant with either the offense or offenses named in the order of commitment or any offense or offenses shown by the evidence taken before the magistrate to have been committed."
[4]  For additional discussions of the varied functions of preliminary hearings, see Graham & Letwin, supra, at pages 639-641, 661-668, 916-961; Note, The Preliminary Hearing in California: Adaptive Procedures in a Plea Bargain System of Criminal Justice (1976) 28 Stan.L.Rev. 1207; Comment, Criminal Discovery at and Before the Preliminary Examination (1975) 15 Santa Clara Law. 665, 678-687.
[5]  In Ervin v. Superior Court, supra, 119 Cal.3d 78, the Grilli issue was raised but conceded by the Attorney General. (Id. at pp. 82-84.) Nevertheless, the court proceeded in dictum to an extensive discussion severely criticizing the Grilli rationale and concluding that enhancements should be subject to section 995 review. (Id. at pp. 83-89.) Although persuaded by the reasoning of Ervin, the court in People v. Redman (1981) 125 Cal. App.3d 317 [178 Cal. Rptr. 49], felt compelled to conclude that a defendant could not challenge a firearm use allegation via section 995. (Id. at p. 326.) Despite this conclusion, it nevertheless proceeded to determine independently that the evidence presented at the preliminary hearing did in fact constitute sufficient cause to hold the defendant to answer on the enhancement. (Id. at pp. 327-329.) Insofar as Redman, however reluctantly, follows Grilli, it is also disapproved.
[6]  It is, of course, well settled that a defendant's challenge under section 995 need not be directed to the entire information but may instead attack only portions thereof. (People v. Murray (1927) 87 Cal. App. 145, 147-148 [261 P. 740]; People v. Hudson (1917) 35 Cal. App. 234, 237-238 [169 P. 719]; People v. Danford (1910) 14 Cal. App. 442, 449-450 [112 P. 474].) Thus, in this respect, section 995 presents no bar to a challenge of only the enhancement portion of, rather than the entire, information.
[7]  Section 871 provides in relevant part: "If, after hearing the proofs, it appears either that no public offense has been committed or that there is not sufficient cause to believe the defendant guilty of a public offense, the magistrate shall order the complaint dismissed...."
[8]  The question of whether a magistrate may dismiss a charged enhancement under section 871 is not directly before us in the present case because the enhancement here did not appear in the original complaint but was added to the information after the preliminary hearing. Under the reasoning of Ramos, however, it appears that because we hold that enhancements are within the scope of section 995 review, they will also be subject to dismissal by a magistrate under section 871.
[9]  The People are particularly concerned that they will be required to charge and prove prior convictions at the preliminary hearing stage. A specific statutory provision, however, permits amendment of the information and rearraignment of the defendant "Whenever it shall be discovered that a pending indictment or information does not charge all prior felonies of which the defendant has been convicted...." (Pen. Code, § 969a; italics added.) Nothing in this opinion is intended to question this statutorily authorized procedure.
