more unit tests, means less bugs. fixes #3