environment settings logic update