solve issue with copy.deepcopy