chat functionality finished