more matching algorithm : final design