adjusted deep copy