add unit test. closes #79