update chats structure