Revert "environment support"

This reverts commit 3d6dd4d03b6a1b0c78033e53b367d9fab63522cb.
Revert "Revert "environment support""

This reverts commit f67e4def522d76129ee93719e4a5f666d690c4ba.