deepcopy everywhere
returning the right env