added document and type models