remove reference to global document