added a test for the new function