the 2 environment calls looks bizarre