fixes #1: fix reference errors; add test cases
update README.md