removing the global document and passed as local