rewrite arbitraryMatching for completeness (and less redundancy)