added the test function