Pack and Unpack of documents implemented