handles restarts