add in env variable. fix investigation bug