fixes #25 add test cases and data for 3 incompletely covered branches

this gets us 100% coverage including all branches