code refactored code