Fixes. Added enviroment function.