three-way matching system