add documents and bug fix