Refactored copy() method