added more unit tests to increase code coverage to 99%