chagnging environment detection variable to environment