Changing the structure of the environments attribute