Transforming pollution into power