stubbing the environment calls