refactored document structure