added chat functionality