restart refactored code