refactored restart.