added a test function