added possibility to update the current environment