adjusted environment detection to fit HS design practices