refactor(escallmatch): eliminate duplication