refactored restart