refactor refactored