added unit tests for better code coverage