refactor .foreach bindEnv usage