improved test coverage to 96%