The Boston Water and Sewer Commission (BWSC) serves retail customers with water services in Boston, Massachusetts. It purchases water wholesale from the Massachusetts Water Resources Authority (MWRA). The largest retail water and wastewater utility in New England, BWSC owns and operates the drinking water distribution, wastewater collection and stormwater drainage systems; which utilise 1,015 miles (1,633 km) of water main and 1,435 miles (2,309 km) of sewer pipe and storm drain. It was created in 1977 taking control of the city operated sewer system and the state operated treatment facilities. The basic Boston water distribution system opened in 1848, and the wastewater collection system in 1883. In a response to the dangers posed to Boston by severely deteriorated water distribution and wastewater collection systems, BWSC was created in 1977 by an act of the Massachusetts legislature as a public instrument, a corporate separate and apart from the City of Boston. The Enabling Act empowered the BWSC to independently set rates and charges for the water distribution and wastewater collection services it provides and entrusted BWSC to improve and maintain the integrity of its systems.