added unit test functions