move env to top
add new test for deletion ownership