updated tests/code using new deepcopy