simple refactored