better path matching system