search: find matching pairs