prepare for restart