modified a test function