added unit test code