improved test coverage to 97% with 2 lines missing