visual tester for counting inversions