add documents.
fix some bugs.