Implement deep copy