chatgui implementation