How to turn energy windfall into a blessing rather than a curse