refactor dialogue matching and more lot of matching unit test to interaction