added chat functionality to examples