factored out DOCPATH