removing static ref to document
removing static reference to document