move match concatenation into its own class, updating test