add documents and improve stability