added clearFunctionEnv