added archetype and document support