
162 Cal.App.2d 1 (1958)
LOUIS G. PEPPER et al., Respondents,
v.
THE BOARD OF DIRECTORS OF THE BOLINAS PUBLIC UTILITY DISTRICT et al., Appellants.
Civ. No. 17885. 
California Court of Appeals. First Dist., Div. Two.  
July 7, 1958.
 Hadsell, Murman & Bishop for Appellants.
 Lawrence Draper, Jr., Sam J. Whiting, Jr., Crimmins, Kent, Draper & Bradley, Thomas J. Barfield and Walter E. Hettman for Respondents.
 DOOLING, J.
 The petitioners in the court below sought a writ of mandate to compel the respondents below to place petitioners' names on the ballot as candidates for director of Bolinas Public Utilities District. This appeal is from a judgment granting a peremptory writ of mandate as prayed.
 The nominating petitions of these candidates were in the form and filed with the directors of the district within the time provided in section 15966 Public Utilities Code, but they were not in the form (Elec. Code,  2601) nor filed within the *3 time (Elec. Code,  2600) provided by the general election laws.
 The Public Utility District Act was codified and added to the Public Utilities Code in 1953. (Stats. 1953, ch. 72, p. 751.) Later at the same session section 15966 was amended to its present form. (Stats. 1953, ch. 1196, p. 2711,  2.) Section 15966 as so amended reads:
 "(a) Not less than 30 days prior to the election, any five or more electors in the district may file with the board of directors a petition requesting that the names of certain persons specified in the petition be placed upon the ballot as candidates for the office of director at large."
 "(b) Not less than 30 days prior to the election, any five or more electors of a territorial unit may file with the board of directors a petition requesting that the name of a designated person specified in the petition be placed upon the ballot as candidate for the office of director from the territorial unit."
 [1] In its present form, according to the plain meaning of its language, section 15966 cannot refer to nominations of directors at the first election of directors after the formation of a public utility district, because until after such first election of directors there is no "board of directors" with whom such nominating petitions may be filed, as expressly directed by that section. Giving the words of the section their plain meaning the section equally does apply to the nomination of directors at all subsequent elections, at which times there is a "board of directors" with whom the nominating petitions may be filed as therein provided. This is the construction put upon the section by the trial court.
 It is appellants' contention that despite the clear language of section 15966 as it now reads, that the nominating petitions therein provided for shall be filed with "the board of directors," and despite the fact that there is no "board of directors" with whom such petitions can be filed before the first election of directors, section 15966 nevertheless applies only to the first election of directors and does not, as the trial court held in this case, apply to subsequent elections. To make the section conform to the meaning which they ascribe to it appellants ask us to read "board of directors" to mean "board of supervisors." We can find no justification for thus reading the section to mean something which its own language makes it perfectly plain that it does not mean.
 Appellants argue, however, that the construction for which *4 they contend must be given to section 15966 in order to have any provision in the statute for the nomination of directors at the first election. We find no such difficulty in the statute. Section 16152 Public Utilities Code provides:
 "The provisions of law relating to ... the manner of nominating county officers, as far as applicable, govern all district elections, except when otherwise provided in this division." This is a catch-all provision and makes the law regarding the nomination of county officers apply to all elections for which no other provision is made in division 7, Public Utilities Code. If section 15966 as it now reads is construed according to the plain meaning of its words to apply to all subsequent elections of directors after the first election section 16152 fills in the gap and makes the law relating to nominations of county officers applicable to the first election of directors for which no other provision is now made in the statute.
 [2] While it is true, as stated by appellants, that where necessary to give a statute any reasonable meaning or where it manifestly appears that the Legislature has erroneously used one word for another, the courts may substitute the intended word for the one erroneously used (23 Cal.Jur., Statutes,  116, pp. 738-739), the need for such substitution should be patent and pressing and such action should not be taken by the courts where the language of the statute given its ordinary and obvious meaning will accomplish the full purpose of the legislation. The Legislature itself has admonished us that: "In the construction of a statute ... the office of the Judge is simply to ascertain and declare what is in terms or in substance contained therein, not to insert what has been omitted, or to omit what has been inserted ..." (Code Civ. Proc.,  1858.) [3] Following this rule the "intention of the legislature will be determined so far as possible from the language of its statutes, read as a whole, and if the words of an enactment, given their ordinary and popular signification, are reasonably free from ambiguity and uncertainty, the courts will look no further to ascertain its meaning." (23 Cal.Jur., Statutes,  109, pp. 730-731.) [4, 5] "It is the function of the courts to construe and apply the law as it is enacted and not to add thereto nor detract therefrom" (Pacific Coast etc. Bank v. Roberts, 16 Cal.2d 800, 805 [108 P.2d 439]; In re Miller, 31 Cal.2d 191, 199 [187 P.2d 722]; Kirkwood v. Bank of America, 43 Cal.2d 333, 341 [273 P.2d 532]) and "the better and more modern rule of *5 construction is to construe a legislative enactment in accordance with the ordinary meaning of the language used and to assume that the Legislature knew what it was saying and meant what it said." (Pacific Gas & E. Co. v. Shasta Dam etc. Dist., 135 Cal.App.2d 463, 468 [287 P.2d 841].)
 Appellants argue from the history of the act that because section 15966 before its amendment applied to the first election of directors it must still be construed, despite its radical change in language, to apply to the first election. We are not called upon to construe the section as it read before its amendment, but as it reads now, and since the very purpose of an amendment is to change the meaning or application of the statutory provision amended we fail to see the force of this argument. As it now reads section 15966 applies, and can apply, only to elections at which there is a "board of directors" with whom the nominating petitions therein provided for can be filed.
 [6] Appellants attempt to invoke the rule that the various headings of the statute may be looked to in construing sections 15966 and 16152, but they disregard Public Utilities Code, section 6, which reads: "Division, part, chapter, article, and section headings do not in any manner affect the scope, meaning, or intent of the provisions of this code." In the face of such a provision the headings may not be considered in construing the code and the several sections must be given the construction which their language demands without regard to the headings under which they may appear. (In re Halcomb, 21 Cal.2d 126, 130 [130 P.2d 384]; Klassen v. City of San Carlos, 149 Cal.App.2d 225, 228 [308 P.2d 413]; People v. Trout, 137 Cal.App.2d 794 [291 P.2d 83]; Cavalli v. Luckett, 40 Cal.App.2d 250, 255- 256 [104 P.2d 708].)
 Our reading of section 15966 according to the plain meaning of its words finds support, if any be needed, in the history of its amendment to its present form.
 After the Public Utilities District Act was codified by the Legislature in 1953 and at the same session a bill was introduced to add article 6.5 to this act. Article 6.5 as originally introduced added sections 16171 to 16174 to the Public Utilities Code. This amendment introduced an entirely new idea, providing in substance that if only one person should be nominated for each office of director the election might be dispensed with and the nominees be appointed by the board of supervisors to the positions of director without the holding of an election. *6
 After its introduction this bill was amended in the assembly to add thereto section 2 which amended section 15966 to its present form. This statute as so amended was adopted as chapter 1196. (Stats. 1953, p. 2710.)
 Prior to this amendment the general election laws governed the nomination of directors at all district elections. (Pub. Util. Code,  15966, as it read before its last amendment, Stats. 1953, p. 759;  15971, 16152.) The Elections Code, section 2605, subdivision (c), requires a minimum of 20 sponsors to sign such petitions or where there are less than 150 registered voters in the district at least 10 sponsors. (Elec. Code,  2605, subd. (f).) The nominations must be in the form provided by Elections Code, section 2601, and must be filed not less than 60 days prior to the election. (Elec. Code,  2600.)
 Section 15966 as last amended substitutes a simple petition for the form required by Elections Code, section 2601, extends the time within which such petitions may be filed to 30 days before the election; and reduces the number of electors who must sign such petition to five.
 The purpose of this last amendment of section 15966 appears obvious on the face of the statute. The Legislature was providing for the appointment of directors where only one person was nominated for each office and was thus taking away from the voters the right of franchise in those cases. If the voters were to be deprived of the right to vote for the persons of their choice where only one person was nominated for each office, what more natural safeguard of their right of franchise could be devised than to provide a simpler system of nomination, make nominations easier by reducing the number of sponsors required, and enlarge the time within which such nominating petitions might be filed? This is precisely what the Legislature did by adding section 2 to Statutes 1953, chapter 1196 which amended Public Utilities Code, section 15966, to its present form.
 The weakness of the argument that "board of directors" in this section really means "board of supervisors" is apparent from another point of view. Before its last amendment section 15966 made the general election laws applicable to nominating petitions. Under the general election laws nominating petitions are not filed with the board of supervisors but with the county clerk. (Elec. Code,  2632.) We are asked by appellants to believe that the Legislature amended section 15966 to change the place of filing from the county clerk to the board of supervisors and to accomplish this purpose *7 described the board of supervisors in the amendment as "the board of directors." Even the severest critic of the legislative process would hesitate to ascribe such ineptness with words to the Legislature.
 Judgment affirmed.
 Kaufman, P. J., and Draper, J., concurred.
