add unit tests, partial coverage
test coverage 90%
remove dead branch
lint clean