need to call duplicate() occasionally to make the tests work
mocking imported functions now works!
not patching package environment anymore
cleanup
only need to mock in one environment at a time