add match functionality