add some more tests, simplify, comment

Issue #24