delivered the opinion of the court:
Plaintiffs filed a declaratory judgment action challenging the constitutionality and validity of “An Act to permit certain burials on Sundays and legal holidays ***.” On appeal from an order granting defendants-intervenors’ motion for summary judgment, plaintiffs contend: (1) the Act violates the establishment clause of the United States Constitution and article I, section 3, of the Illinois Constitution; (2) State action in the area of labor relations is preempted by Federal law; (3) the Act violates the equal protection clauses of the United States and Illinois constitutions and the Illinois constitutional prohibition on special legislation; (4) their right of free exercise of religion guaranteed under the constitution and the Federal Civil Rights Act of 1964 is abridged by the Act; (5) the Act mandates involuntary servitude; (6) the Act violates due process; and (7) the obligations of contract are impaired by the Act.
We affirm.
The subject of this appeal is “An Act to permit certain burials on Sundays and legal holidays ***” (the Act) (Ill. Rev. Stat. 1983, ch. 21, par. 101 et seq.). The pertinent provisions of the Act provide:
“Sec. 1. (a) Every contract, agreement or understanding between a cemetery authority and a cemetery workers’ association which totally prohibits burials of human remains on Sundays or legal holidays shall be deemed to be void as against public policy and wholly unenforceable.
(b) Nothing in this Section shall prohibit a cemetery authority and a cemetery workers’ association from entering into a con*454tract, agreement or understanding which limits Sunday or holiday burials of human remains to decedents who were members of religious sects whose tenets or beliefs require burials within a specified period of time and whose deaths occurred at such times as to necessitate Sunday or holiday burials. Such contract, agreement or understanding may provide that a funeral director notify the cemetery authority within a reasonable time when a Sunday or holiday burial is necessitated by reason of the decedent’s religious tenets or beliefs.
(c) It shall be unlawful for any person to restrain, prohibit or interfere with the burial of a decedent whose time of death and religious tenets or beliefs necessitate burial on a Sunday or legal holiday.
* *
“Sec. 2. Any person aggrieved by any conduct of a cemetery authority or cemetery workers’ association which is prohibited by Section 1 may maintain an action in the circuit court of the county in which the violation occurred to enjoin any conduct in violation of that Section. The circuit court may enter an expedited order or temporary restraining order without notice and hearing to protect the rights of persons aggrieved by such conduct in violation of Section 1 of this Act.” Ill. Rev. Stat. 1983, ch. 21, pars. 101(a), 101(b), 101(c), and 102.
Plaintiffs Martin Heckmann and Edward T. Cawley, elected representatives of Local 106, AFL-CIO Employees • International Union, filed a class action on behalf of union members seeking to have the Act declared invalid and unconstitutional. The named defendants were Cemeteries Association of Greater Chicago, Inc., an association of approximately 30 cemetery owners and operators, and Robert Rothschild, director of the Association’s labor committee. The State of Illinois, the Jewish Burial Society, the Jewish Sacred Society, Agudath Israel of Illinois, Merkaz Harabonim-Chicago Orthodox Rabbinate, Congregation Poalei Zedek, Maine Township Jewish Congregation, Congregation Ezras Israel and Congregation Shaarei Tfiloh B’nai Reuven Nusach Hoari were granted leave to intervene.
Plaintiffs’ complaint alleged that Rothschild, in his capacity as director of the labor committee and as operator of Evergreen Cemetery, told Cawley that after the effective date of the Act, any cemetery worker refusing to perform duties on Sundays or holidays would be fired. Under the collective bargaining agreement entered into by plaintiffs and the Association, the following holidays were designated workless holidays: New Year’s Day, Independence Day, Labor Day, *455Veteran’s Day, Thanksgiving Day, Christmas Day and the employee’s birthday. The agreement further provided that no funeral services, interments, cremations or storages would be held on such holidays or Memorial Day except for cases where immediate burial was required by board of health regulations. Also, by custom and mutual understanding between cemetery workers and owners, no work is performed on Sunday, the day workers observe as their day of rest and religious holiday.
Plaintiffs’ motion for judgment on the pleadings was denied, and the trial court entered an order granting defendants-intervenors’ motion for summary judgment. For the reasons advanced in the issues which follow, plaintiffs argue that the trial court erred in granting the motion for summary judgment. All of the issues raised on appeal were raised in plaintiffs’ complaint.
First, plaintiffs contend the Act violates the establishment clause of the United States Constitution and article I, section 3, of the Illinois Constitution, which prohibits preference to any religious denominations or mode of worship.
Generally, the establishment clause of the first amendment, made applicable to the States by the fourteenth amendment (Everson v. Board of Education (1947), 330 U.S. 1, 91 L. Ed. 711, 67 S. Ct. 504), prohibits governmental sanctioning of the tenets of any and all religions. (School District v. Schempp (1963), 374 U.S. 203, 10 L. Ed. 2d 844, 83 S. Ct. 1560.) Neither the States nor the Federal Government may pass laws which aid religion or prefer one religion over another. (Everson v. Board of Education (1947), 330 U.S. 1, 91 L. Ed. 711, 67 S. Ct. 504.) Nevertheless, statutes which confer benefits or give special recognition to religion in general or to one faith are not invalidated merely on that basis; rather, legislation must be examined to determine whether it establishes a religion or religious faith or tends to do so. Lynch v. Donnelly (1984), 465 U.S. 668, 79 L. Ed. 2d 604, 104 S. Ct. 1355.
To defeat a challenge based on the establishment clause, a statute generally must satisfy three criteria: (1) the law must have a secular legislative purpose; (2) its principal effect must neither advance nor inhibit religion; and (3) the law must avoid excessive government entanglement with religion. (Lynch v. Donnelly (1984), 465 U.S. 668, 79 L. Ed. 2d 604, 104 S. Ct. 1335; Larkin v. Grendel’s Den, Inc. (1982), 459 U.S. 116, 74 L. Ed. 2d 297, 103 S. Ct. 505; Lemon v. Kurtzman (1971), 403 U.S. 602, 29 L. Ed. 2d 745, 91 S. Ct. 2105.) All the facts and circumstances of each case must be considered (Lynch v. Donnelly (1984), 465. U.S. 668, 79 L. Ed. 2d 604, 104 S. Ct. 1335; Lemon *456 v. Kurtzman (1971), 403 U.S. 602, 29 L. Ed. 2d 745, 91 S. Ct. 2105), and, at times, the three-part test set forth above has not been applied. In fact, in Lynch, the court noted that courts are not confined to any single test in this area. (465 U.S. 668, 679, 79 L. Ed. 2d 604, 613, 104 S. Ct. 1335, 1362.) Regardless of the approach used in this case, we find that the Act does not violate the establishment clause.
The act in question has a valid secular purpose. The record indicates that certain religious groups were required to conduct burials on Sundays or holidays because of their religious beliefs and could not always act in accordance with their beliefs because under certain labor agreements, cemetery workers did not have to perform interments on those days. The Act eliminated the discriminating effect of the agreements. Statutes designed to eliminate even unintentional discrimination and to accommodate religious beliefs are secular in purpose. (Nottelson v. Smith Steel Workers D.A.L.U. 19806, AFL-CIO (7th Cir. 1981), 643 F.2d 445, 454, cert, denied (1981), 454 U.S. 1046, 70 L. Ed. 2d 488, 102 S. Ct. 587.) Furthermore, the Act does confer a benefit to one group to the exclusion of others, but relieves a burden on those who were unable to freely exercise their beliefs. It neither requires a particular religious affiliation or theological position nor inhibits the exercise of religious beliefs. Therefore, the Act meets the second criteria. (Nottelson v. Smith Steel Workers D.A.L.U. 19806, AFL-CIO (7th Cir. 1981), 643 F.2d 445.) Finally, we find that the statute does not foster excessive government entanglement with religion because government does not have to involve itself in any administration or planning and religion is not politicized. For these reasons, we reject plaintiffs’ contention that the Act violates the Illinois constitutional provision prohibiting religious preferences.
Second, plaintiffs contend that by enacting the National Labor Relations Act (NLRA) (29 U.S.C. sec. 151 et seq. (1982)), the Federal Government has preempted States’ rights to regulate and restrict union collective bargaining processes. They maintain that the act at issue in this case is unauthorized and prohibited legislation because it requires union members to relinquish their negotiated right to nonworking Sundays and holidays, thereby interfering with the union’s collective bargaining powers.
States cannot restrict labor rights guaranteed by Federal law. (Lodge 76, International Association of Machinists and Aerospace Workers, AFL-CIO v. Wisconsin Employment Relations Com. (1976), 427 U.S. 132, 49 L. Ed. 2d 396, 96 S. Ct. 2548.) However, Federal labor policies are subordinate to first amendment rights (Nottelson v. Smith Steel Workers D.A.L.U. 19806, AFL-CIO (7th Cir. 1981), 643 *457F.2d 445) and a State may act to correct discriminatory practices within a union to accommodate religious beliefs of some union members. Nottelson v. Smith Steel Workers D.A.L.U. 19806, AFL-CIO (7th Cir. 1981), 643 F. 2d 445, 450-51.
As noted previously in this opinion, the Act accommodates those who were unable to practice their beliefs because of the agreement and understanding that no burials would be made on Sundays and holidays. We have no doubt that Congress or the Federal courts would not countenance a denial of first amendment rights in order to enforce an agreement denying those rights. Just as the NLRA cannot shield an employer or union from making reasonable accommodations to the religious needs of employees, we believe the NLRA cannot be invoked to allow cemetery workers to deprive those whom they serve of their right to practice their religious beliefs.
Plaintiffs further contend that the Act violates the equal protection clauses of the United States Constitution and the Constitution of Illinois and the State prohibition of special legislation.
Special legislation is that which “confers a special benefit or exclusive privilege on a person or a group of persons to the exclusion of others similarly situated.” (Illinois Polygraph Society v. Pellicano (1980), 83 Ill. 2d 130, 137, 414 N.E.2d 458, 462.) However, a statute classifying persons does not violate the special legislation proscription if there is a reasonable basis for the classification and if the legislation bears a reasonable and proper relation to the purpose of the act and the evil sought to be remedied. (Bridgewater v. Hotz (1972), 51 Ill. 2d 103, 281 N.E.2d 317.) A law need not affect every person or place in the State alike, but it must operate uniformly on all persons in like circumstances. Youhas v. Ice (1974), 56 Ill. 2d 497, 309 N.E.2d 6; People ex rel. Vermilion County Conservation District v. Lenover (1969), 43 Ill. 2d 209, 251 N.E.2d 175.
In view of the foregoing principles, we reject plaintiffs’ argument that the Act arbitrarily conferred a special benefit on certain religious groups in violation of the special legislation clause. As pointed out previously in this opinion, the legislature sought to relieve a burden on those who had not been able to freely exercise their religious beliefs. The classification made in the Act was reasonably related to its purpose and the evil to be remedied.
Many of the principles applicable to the special legislation issue are also applicable to the equal protection question. These are that legislative classifications cannot be arbitrary and must be-based on a rational difference of condition or situation. Where the legislature concludes that reform is necessary, it may address itself to one stage *458of the problem and remedy it one step at a time. (Illinois Coal Operators Association v. Pollution Control Board (1974), 59 Ill. 2d 305, 319 N.E.2d 782; Youhas v. Ice (1974), 56 Ill. 2d 497, 309 N.E.2d 6.) However, as noted in Illinois Polygraph Society:
“Special legislation differs from a violation of equal protection in that the latter consists of arbitrary and invidious discrimination against a person or a class of persons. It results from the governmental withholding of a right, privilege or benefit from a person or a class of persons without a reasonable basis (or, where a fundamental right or suspect classification is involved, a compelling State interest) for doing so. Whether a law is attacked as special legislation or as violative of equal protection, it is still the duty of the courts to decide whether the classification is unreasonable in that it preferentially and arbitrarily includes a class (special legislation) to the exclusion of all others, or improperly denies a benefit to a class (equal protection). [Citation.]” 83 Ill. 2d 130, 138, 414 N.E.2d 458, 462-63.
Plaintiffs maintain that the Act violates equal protection because it applies only to agreements between union workers and cemetery associations and not to agreements between nonunion workers and other cemeteries. However, the Act’s targeting of labor association agreements and its provision declaring agreements which totally prohibit Sunday and holiday burials void may be justified on the legislature’s belief that unions traditionally have been in a better position to negotiate such workless days. Thus, associations are generally responsible for the total ban on Sunday and holiday burials. Additionally, section 1(c) of the Act (Ill. Rev. Stat. 1983, ch. 21, par. 101(c)) makes it unlawful for any person, not just labor association members, to restrain, prohibit or interfere with burials permitted under the Act. This section is general and treats all persons alike. We cannot say that the classification is arbitrary or that the legislature acted unreasonably in singling out workers’ association agreements.
Fourth, plaintiffs contend the Act violates section 703(a)(1) of the Civil Rights Act of 1964 (42 U.S.C. 2000e — 2(a)(l)(1982)) and abridges their right of free exercise of religion. Each contention is based on plaintiffs’ belief that the statute requires and compels all cemetery employees to work on Sundays and holidays under penalty of criminal sanctions. They further maintain that statutory mandate violates the rights of those workers whose religious beliefs do not allow work on Sundays or religious holidays.
Initially, we note that no provision of the Act compels any cemetery worker to work on Sundays or holidays. Its provisions only ex*459tend to voiding contracts totally prohibiting burials on all Sundays and holidays and to interferences with burials conducted on those days. Furthermore, depositions in the record indicate that Sunday burials had been conducted in the past and that cemeteries had no difficulty recruiting workers willing to perform the services. There has not been any conflict with the religious beliefs of employees in the past, and the Act as written does not present such conflicts. The scenario depicted by plaintiffs that employees will be forced to work on these days is unfounded.
Plaintiffs’ fifth contention is that the Act violates the Federal constitutional prohibition of involuntary servitude because it compels employees to work. Because of our finding that the Act does not require any employee to work against his will, we reject plaintiffs’ argument.
Sixth, plaintiffs contend that section 2 of the Act (Ill. Rev. Stat. 1983, ch. 21, par. 102), which permits the issuance of a temporary restraining order without notice, violates due process. However, this section of the Act does not allow an order to issue in all circumstances. It states that the circuit court may enter the order to protect rights of those aggrieved. The general rules pertaining to issuing temporary restraining orders found in the Code of Civil Procedure (Ill. Rev. Stat. 1983, ch. 110, par. 11—101) remain applicable, and plaintiffs have not argued that this section of the Code is unconstitutional. Plaintiffs have misconstrued the provision of the Act, and we find their contention to be without merit.
Finally, plaintiffs contend the Act abridges their freedom to contract and violates the Federal and State constitutional prohibition against the impairment of contractual obligations.
The contract clause limits a State’s power to regulate contracts between private parties, but the prohibition is not absolute. (United States Trust Co. v. New Jersey (1977), 431 U.S. 1, 52 L. Ed. 2d 92, 97 S. Ct. 1505; Meegan v. Village of Tinley Park (1972), 52 Ill. 2d 354, 288 N.E.2d 423.) Rights granted by contract are subject to reasonable regulatory actions by the State designed to secure the welfare of the community. (Meegan v. Village of Tinley Park (1972), 52 Ill. 2d 354, 288 N.E.2d 423.) We believe the legislation in issue does not offend the constitutions’ contract clauses. Its provisions are narrowly drawn to permit the free exercise of religious rights while allowing labor to restrict their working schedules accordingly. It is, as noted above, a reasonable exercise of legislative authority in an area of legitimate legislative concern.
For the foregoing reasons, the order of the circuit court of Cook *460County is affirmed.
Order affirmed.
O’CONNOR, J., concurs.