remove one more use of deepcopy