makes sure an env is run only once