add unit tests, enhance README.md