added unit test for new function