Updated execute method in the environment.