Using deepcopy instead of copy