Refactored helper methods