close, open & assign doc