1. add a bi-matching algo and refine testcase