debuging around set_environments