replaced document with dependency-injected version