create test function