Achieving a just transition in the energy system