changed test function