removed deepcopy import as we are using a clean repack_env