fixed bugs, add test
updated readme