WIP on inference matching
WIP on matching algorithm