Recycling wastewater to treat wastewater