add test and code coverage