update README.md
fix bugs
add unit test