trigger an event on text match
update index.js for on text match event