Refactored: reduced code duplication