adding a chat functionality