refactored parentdocument path handling to user factory