chat functionality working