Refactored extend method to isolate testing