trimming matches