add some match calculation logic
more match calculation