added test function