fixed unit testing setup and added code coverage