Update the environment