Repurposing coal plants into solar and battery can be beneficial for society at large