added comments to explain behavior and useage of the global environment