Changed code to inspect env