change env variable logic