This is a petition for a writ of certiorari which comes before us on the, exceptions of the petitioner to the action of a single justice of this court in dismissing the petition. The case came before the respondent upon the petitioner’s appeal from the action of the Bristol County Retirement Board on December 21, 1938, in voting to retire the petitioner from his position as register of deeds for the Northern District of Bristol County “for superannuation,” effective from the first day of January, 1939. This appeal was taken under the provisions of G. L. (Ter. Ed.) c. 32, § 37C, as amended by St. 1938, c. 360, § 10A.
In its findings the respondent states that “Substantially all the facts are agreed upon, as follows: Enos D. Williams was born on August 10, 1863. He was first elected register of deeds April 24, 1904. He was last elected in 1934 to serve for six years. The Bristol County Retirement System became operative on January 1, 1937. By a written request on March 31, 1937, Mr. Williams applied for membership in the system and asked for the two years extension allowed by the statute. On March 31, 1937, the Bristol County Retirement Board voted to admit him to membership and granted him an extension of two years from the operative date, namely, from January 1, 1937, to January 1, 1939. Mr. Williams notified the Bristol County Retirement Board under date of December 15, 1938, that he waived all retirement benefits and withdrew from the system, also that he intended to complete his term of office. The Bristol County Retirement Board voted to retire Mr. Williams for superannuation on January 1, 1939, and notified him to this effect under date of December 28, 1938.”
“On these agreed facts the appellant contended that, since he was elected by the voters for a term of six years, his election to become a member constituted only an elec*603tian to avail himself of the privilege of membership to the extent that he could retire at any time during the period after he joined, up to January 1, 1939, but that he could legally withdraw from the system (as he purported to do on December 15, 1938) at any time before said January 1, 1939. It was further contended that an elected official who was elected prior to the effective date of the contributory retirement act is in a different position from one elected thereafter, in that the voters in the first case did not know that he might have to retire (if he joined the system) before the expiration of his term, while in the latter case the election must have been in contemplation of such retirement.”
The respondent found that the petitioner joined the retirement system of Bristol County on March 31, 1937, that his letter requesting membership in the system was plain and unequivocal, that he was accepted as a member by the county retirement board which had voted to admit him to membership, and which issued to him a prior service certificate, and that the only question for determination was whether an elected official who was elected before the effective date of the “retirement act” for a term of six years expiring in January, 1941, “could, at his option, repudiate his membership and serve out his term.” The respondent decided that the petitioner became a member of the county retirement system, that he was legally granted an extension of term of service under the provisions of G. L. (Ter. Ed.) c. 32, as amended, which time expired on January 1, 1939, that he was retired by operation of law on that date, that he had no legal right to withdraw from the system, and that his attempt to do so was of no effect. The respondent “denied” the appeal and affirmed the action of the county retirement board.
The petitioner contends before us that he “was never legally a member of the system” and, in the alternative, that, even if it can be said that he became a member, he effectively withdrew from membership before the board attempted to retire him.
The retirement system went into effect in Bristol County *604on January 1, 1937, and was governed by G. L. (Ter. Ed.) c. 32, as amended by St. 1936, c. 400, § 1, which strikes out §§ 20-25, inclusive, of c. 32, and inserts new sections in place thereof. Section 21 (1) (d), thus inserted, provides as follows: “Any person holding office by popular election in a county when the system becomes operative therein, who then has completed not less than six years of continuous service in said office, or who, after the date on which the system becomes operative therein, shall complete six years of continuous service in said office, may, at his option, to be exercised in writing not less than ninety days thereafter, become a member of the system if the duties of his office require him to devote a major portion of his time to the work of such office, and such officer shall receive credit for prior service in all elective and non-elective positions previously held by him in such county, in the same manner as other employees. Any employee of a county or hospital district who becomes a member while holding a non-elective position, and who thereafter accepts an office by popular election, shall retain his membership in the system unless within ninety days after such acceptance he files with the board on a form prescribed by the board a notice of his election not to remain a member of the system and a duly executed waiver of all present and prospective benefits which would otherwise inure to him on account of his participation therein, in which case his accumulated deductions shall be paid to him. Any person not an employee of a county who, after the date on which the system becomes operative therein, is elected by popular election to a county office in such county, and who is required to devote a major portion of his time to the duties of his office, may at his option become a member of the system as of the day six years after he takes office; provided, that such option shall be exercised in writing not later than ninety days after the expiration of said six years.” *
*605The petitioner argues that, since he exercised his option in writing to become a member of the system, before the expiration of ninety days instead of after that period had elapsed, his action was a nullity and that he never became a member of the retirement system. Such a construction of but a fragment of the governing statutes cannot be adopted as it would nullify the manifest purpose of those statutes, which ought if possible to be construed as a whole so as to make them “an effectual piece of legislation in harmony with common sense and sound reason.” Dascalakis v. Commonwealth, 244 Mass. 568, 570. Morrison v. Selectmen of Weymouth, 279 Mass. 486, 492. Knapp v. Amero, 298 Mass. 517, 522. In the same section (§21 [1] [d]) it will be observed that provision is made for the retention of membership in the system of a county employee who becomes a member while holding a nonelective position and who thereafter accepts an office by popular election unless, “within” ninety days after such acceptance, he files with the board, on a form prescribed by it, a notice of his election not to remain a member of the system and a waiver of all present and prospective benefits that would otherwise inure to him on account of his participation therein, in which case his accumulated deductions shall be paid to him. In like manner, with relation to a person not an employee of the county, who may be elected by popular election to a county office “in such county” after the date on which the system becomes operative, and who is required to devote a major portion of his time to the duties of his office, it is provided in the same section that he may “at his option become a member of the system as of the day six years after he takes office; provided, that such option shall be exercised in writing not later than ninety days after the expiration of said six years.” *606That it was the intention of the Legislature as expressed in § 21 (1) (d), that in the cases of all affected thereby the option to become members was to be exercised within a stated time rather than at any time after the expiration of a certain time is further evidenced by other provisions of c. 32 relating to retirement systems. Under the provisions of that chapter relative to the establishment of retirement systems in a city or town, it is provided in § 28 (1) that “All employees of the city or town, when the system is declared established by the issue of the certificate under section twenty-seven, may become members of the association. On the expiration of thirty days from that time every such employee shall thereby become a member, unless he shall have, within that period, sent notice in writing to the city council or selectmen that he does not wish to join the association.”
Section 21 (1) (b) inserted in G. L. (Ter. Ed.) c. 32, by St. 1936, c. 400, § 1, concerns the membership in retirement systems of employees of a county or hospital district. In this section also it is provided that an employee in the service of a county or hospital district on the date when the system becomes operative shall become a member as of that date, unless “at or before the expiration of ninety days thereafter” he files with the board notice of his election not to become a member and a waiver of benefits. Thus throughout the governing statutes, with exceptions not here material, we find these provisions calling for an election on the part of those already in the service when retirement systems become operative, within a fixed number of days thereafter — provisions manifestly essential to the conduct and management of contributory retirement systems. Reading the pertinent statutes as a whole, we are of opinion that by the provision in St. 1936, c. 400, § 1, upon which the petitioner relies, it was intended by the Legislature that a person holding office by election under the conditions set forth in the section should exercise his option to become a member of the system within ninety days from the date when he was eligible to do so, and not at some undefined time after the expiration of those ninety days, and that, having exercised his option *607within the period limited, the petitioner became a member of the county retirement system involved on March 31, 1937, as found by the respondent. See National Bank of Commerce v. New Bedford, 175 Mass. 257.
The other contention of the petitioner, that during the term for which he was elected and before retirement he could withdraw from the system, and that having notified the county retirement board of his withdrawal he ceased to be subject to the provisions of the statutes governing the system, cannot be sustained.
In Goodale v. County Commissioner of Worcester, 277 Mass. 144, it was held that a county commissioner of Worcester County who was a member of the retirement system must retire upon reaching the age of seventy years even though his term of office had not expired. In that case the retirement system was in effect at the time of the election of the official concerned. He applied for and was admitted to membership and had paid in full the required contributions. At pages 149-150 the court said: “Apart from constitutional restriction the Legislature has the power to fix and change the salaries of county officers, to regulate, limit or enlarge their duties, to shorten their terms of office, or to abolish the office itself as public exigency or policy may require”; and at page 152 pointed out that the Legislature must have known, and the voters in casting their votes for elective officers of Worcester County and the petitioner in accepting his office may be presumed to have known, that the term of office prescribed would be curtailed if the officer elected became a member of the system and reached the age of seventy years before the expiration of the term for which he had been elected. The petitioner contends that the present case is distinguishable from the case just referred to, since in the present case it appears that he was elected before the retirement system became operative. We think the present case is not distinguishable in principle. It is true that in the present case the voters, by casting their votes for the petitioner, cannot be presumed to have known that the term of office of the petitioner might be curtailed by acceptance by him of mem*608bership in a retirement system, operative not before but after his election; but, nevertheless, that system was one authorized by the Legislature and binding on the public under the powers discussed in the Goodale case, and the petitioner in accepting membership therein must be held to have done so under legislative sanction and to be bound thereby.
In the case of Cogan v. Cambridge Retirement System, 294 Mass. 577, it was held that one who was in the service of the city when its retirement system became operative, and who elected to become a member thereof, must retire upon reaching the age of seventy years; that he could not defeat the purposes of the statute by withdrawing from membership; that membership was compulsory as to employees entering the service after the retirement system became operative; and that, when an election has been made by one already employed, the same is true. We think that this principle, although applied in the case of an employee, is just as applicable to the case of an elective official who elects to become a member of a county retirement system; and that the petitioner, having made such an election, was not at liberty to withdraw from membership as he was. about to reach the time fixed for retirement, and thereafter continue to serve for the remainder of the term for which he had been elected.
, Exceptions overruled.
See now St. 1937, e. 336, § 2, which became effective May 24, 1937, and which so far as pertinent reads as follows: “Any person holding office by popular election in a county when the system becomes operative therein, including a register, of probate, may, at his option, to be exercised in writing not later than ninety days thereafter, become a member of the system and *605such officer shall receive credit for prior service in all elective and non-elective positions previously held by him in such county, in the same manner as other employees. Any employee of a county or hospital district who becomes a member while holding a non-elective position, and who thereafter accepts an office by popular election, shall retain his membership in the system. Any person not an employee of a county who, after the date on which the system becomes operative therein, is elected by popular election to a county office in such county shall if then under age fifty-five become a member of the system,”