a more robust test for the function