extra: split match_comparison() into two functions