update test to count invalid appearances