add docs and rewrite the README.md